Fix handling of backspace at beginning of line.

In the big boolification commit (3214563d8) I accidentally rewrote
"term->wrap == 0" as "term->wrap" instead of as "!term->wrap", so now
sending the backspace character to the terminal at the start of a line
causes the cursor to wrap round to the end of the previous line if and
only if it _shouldn't_ have done.
This commit is contained in:
Simon Tatham 2018-12-08 16:12:05 +00:00
Родитель 41e1a586fb
Коммит 383a16d5e5
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -3185,7 +3185,7 @@ static void term_out(Terminal *term)
}
break;
case '\b': /* BS: Back space */
if (term->curs.x == 0 && (term->curs.y == 0 || term->wrap))
if (term->curs.x == 0 && (term->curs.y == 0 || !term->wrap))
/* do nothing */ ;
else if (term->curs.x == 0 && term->curs.y > 0)
term->curs.x = term->cols - 1, term->curs.y--;