From 383a16d5e54ae2563e630511a6e275833c4dfcc0 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 8 Dec 2018 16:12:05 +0000 Subject: [PATCH] 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. --- terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminal.c b/terminal.c index 40e130f5..1d55d6be 100644 --- a/terminal.c +++ b/terminal.c @@ -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--;