summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-10-23 10:16:14 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-10-23 10:16:14 +0000
commitf0aad68aeef493954d3a840bea134abd22b37c2d (patch)
treea02b92fcc0ce1bb8ad8883ff631ebb1e593d28ca /input.c
parent7ff4cf94050e11517bb6fa89be2f5f4c85af12e3 (diff)
Support for \e[3J to clear the history. Also send the corresponding
terminfo code (E3) before locking.
Diffstat (limited to 'input.c')
-rw-r--r--input.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/input.c b/input.c
index 9237ef5c..a914aa5a 100644
--- a/input.c
+++ b/input.c
@@ -1126,6 +1126,17 @@ input_csi_dispatch(struct input_ctx *ictx)
case 2:
screen_write_clearscreen(sctx);
break;
+ case 3:
+ switch (input_get(ictx, 1, 0, 0)) {
+ case 0:
+ /*
+ * Linux console extension to clear history
+ * (for example before locking the screen).
+ */
+ screen_write_clearhistory(sctx);
+ break;
+ }
+ break;
default:
log_debug("%s: unknown '%c'", __func__, ictx->ch);
break;