vt: document correct BS behavior, and why we do differently

This commit is contained in:
Daniel Eklöf 2021-01-15 18:40:07 +01:00
parent c0a3f89775
commit bc053e4879
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

12
vt.c
View file

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