aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-02 19:40:30 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-02 19:40:30 +0000
commit377f1b7ad3176d12ae274ca9f3b26f7b764493c7 (patch)
treeaee20eade911c2b58f13a0207121e5ff0bf5245e
parentterm: cursor-left: reverse-wrap when cursor is at the left margin (diff)
vt: BS: *only* reset lcf if cursor is beyond right margin: don’t move cursor
This is needed to make reverse auto-wrap work correctly. Without it, we’ll end up moving the cursor left one cell extra.
-rw-r--r--vt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vt.c b/vt.c
index 6b6bbd0b..6cd5ead7 100644
--- a/vt.c
+++ b/vt.c
@@ -130,7 +130,10 @@ action_execute(struct terminal *term, uint8_t c)
case '\b':
/* backspace */
- term_cursor_left(term, 1);
+ if (term->grid->cursor.lcf)
+ term->grid->cursor.lcf = false;
+ else
+ term_cursor_left(term, 1);
break;
case '\t': {