We already implement CSI 0 K and CSI 1 K to erase from cursor to line
end and from line start to cursor, but were missing erasure of the
entire line, so add that as well.

Link: https://terminalguide.namepad.de/seq/csi_ck-2/
Signed-off-by: Ahmad Fatoum <[email protected]>
---
 drivers/video/fbconsole.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
index f586aabdae43..c67e3817ca13 100644
--- a/drivers/video/fbconsole.c
+++ b/drivers/video/fbconsole.c
@@ -689,6 +689,10 @@ static bool fbc_parse_csi(struct fbc_priv *priv)
                        clear_chars(priv, 0, priv->cur.y,
                                    priv->cur.x, priv->cur.y);
                        break;
+               case 2:
+                       clear_chars(priv, 0, priv->cur.y,
+                                   priv->cols - 1, priv->cur.y);
+                       break;
                }
                toggle_cursor_visibility(priv);
                return true;
-- 
2.47.3


Reply via email to