aboutsummaryrefslogtreecommitdiff
path: root/vt.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-01-15 17:40:07 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-01-15 17:40:07 +0000
commitbc053e4879958b53a0db089282c8a044757e5754 (patch)
tree62319454399fa110ec13c5cca518abf19cdecace /vt.c
parentMerge branch 'xsnprintf' (diff)
vt: document correct BS behavior, and why we do differently
Diffstat (limited to 'vt.c')
-rw-r--r--vt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/vt.c b/vt.c
index e8e10b2f..bbb7e990 100644
--- a/vt.c
+++ b/vt.c
@@ -129,10 +129,22 @@ action_execute(struct terminal *term, uint8_t c)
case '\b':
/* backspace */
+#if 0
+ /*
+ * This is the “correct” BS behavior. However, it doesn’t play
+ * nicely with bw/auto_left_margin, hence the alternative
+ * implementation below.
+ *
+ * Note that it breaks vttest “1. Test of cursor movements ->
+ * Test of autowrap”
+ */
+ term_cursor_left(term, 1);
+#else
if (term->grid->cursor.lcf)
term->grid->cursor.lcf = false;
else
term_cursor_left(term, 1);
+#endif
break;
case '\t': {