From e98c88c44c308edaea5994b8ad4363e65030968c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 16 Aug 2022 14:51:53 +0100 Subject: patch 9.0.0218: reading before the start of the line Problem: Reading before the start of the line. Solution: When displaying "$" check the column is not negative. --- src/edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/edit.c') diff --git a/src/edit.c b/src/edit.c index 0b0d174f36..0b7896476a 100644 --- a/src/edit.c +++ b/src/edit.c @@ -1746,8 +1746,9 @@ edit_unputchar(void) * Only works when cursor is in the line that changes. */ void -display_dollar(colnr_T col) +display_dollar(colnr_T col_arg) { + colnr_T col = col_arg < 0 ? 0 : col_arg; colnr_T save_col; if (!redrawing()) -- cgit v1.2.3