term: cursor-left: don’t do reverse-wrapping unless auto-margins are enabled

This matches XTerm’s behavior.
This commit is contained in:
Daniel Eklöf 2020-10-03 10:50:28 +02:00
parent 1ad766f4fb
commit 97e07c1ea1
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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;