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.
This commit is contained in:
Daniel Eklöf 2020-10-02 21:40:30 +02:00
parent 03cacaba86
commit 377f1b7ad3
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

5
vt.c
View file

@ -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': {