summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-16 14:51:53 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-16 14:51:53 +0100
commite98c88c44c308edaea5994b8ad4363e65030968c (patch)
treeee95f55436a1d8c2cd18a8f932adc7ac14a6b409 /src/edit.c
parente1f3fd1d02e3f5fe6d2b6d82687c6846b8e500f8 (diff)
patch 9.0.0218: reading before the start of the linev9.0.0218
Problem: Reading before the start of the line. Solution: When displaying "$" check the column is not negative.
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c3
1 files changed, 2 insertions, 1 deletions
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())