aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-02 18:02:36 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-02 18:02:36 +0000
commit5594746e498e47f91544315171fb02988259017a (patch)
tree303b2540e33202ad284eb190187a0aeb99e101c7
parentterm: cursor-left: reduce move count by one when lcf=true (diff)
Revert "term: cursor-left: reduce move count by one when lcf=true"
This reverts commit 02e3e4ac9b2703a0a867211c2482eab257cbc311. This broke at least Emacs. Cursor movement at the margins *is* undefined, and the behavior we’re now reverting to matches XTerm.
-rw-r--r--CHANGELOG.md2
-rw-r--r--terminal.c5
2 files changed, 0 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8bef0278..67d38093 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -43,8 +43,6 @@
that it is (much) slower compared to previous foot versions. Use the
**scrollback.multiplier** option in `foot.ini` if you find the new
speed too slow (https://codeberg.org/dnkl/foot/issues/144).
-* Cursor left movements moving cursor to wrong location when cursor is
- “beyond” the right margin.
### Security
diff --git a/terminal.c b/terminal.c
index 97840824..0840a45c 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1728,11 +1728,6 @@ term_cursor_home(struct terminal *term)
void
term_cursor_left(struct terminal *term, int count)
{
- if (unlikely(term->grid->cursor.lcf))
- count--;
-
- assert(count >= 0);
-
int move_amount = min(term->grid->cursor.point.col, count);
term->grid->cursor.point.col -= move_amount;
assert(term->grid->cursor.point.col >= 0);