aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/terminal.c b/terminal.c
index 0840a45c..97840824 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1728,6 +1728,11 @@ 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);