summaryrefslogtreecommitdiff
path: root/ddb/db_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'ddb/db_input.c')
-rw-r--r--ddb/db_input.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ddb/db_input.c b/ddb/db_input.c
index 357474b7..04d67510 100644
--- a/ddb/db_input.c
+++ b/ddb/db_input.c
@@ -343,6 +343,17 @@ db_inputchar(int c)
default:
plain:
+ if (was_csi) {
+ if (c == '?' || c == '<' || (c >= '0' && c <= '9') || c == ';') {
+ /* Still in CSI */
+ csi = 1;
+ break;
+ }
+ if (c >= '@' && c <= '~')
+ /* Unsupported sequence, silently drop */
+ break;
+ /* Odd sequence, print it */
+ }
if (db_le == db_lbuf_end) {
cnputc('\007');
}