From 97e07c1ea11edf22e8a2f5a860fe6f32f511593b Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 3 Oct 2020 10:50:28 +0200 Subject: term: cursor-left: don’t do reverse-wrapping unless auto-margins are enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This matches XTerm’s behavior. --- terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminal.c b/terminal.c index e8a3173b..5c94e5aa 100644 --- a/terminal.c +++ b/terminal.c @@ -1733,7 +1733,7 @@ term_cursor_left(struct terminal *term, int count) /* Reverse wrap */ if (unlikely(new_col < 0)) { - if (unlikely(term->reverse_wrap)) { + if (unlikely(term->reverse_wrap && term->auto_margin)) { /* Number of rows to reverse wrap through */ int row_count = (abs(new_col) - 1) / term->cols + 1; -- cgit v1.3