commit | e98c88c44c308edaea5994b8ad4363e65030968c | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Aug 16 14:51:53 2022 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Aug 16 14:51:53 2022 +0100 |
tree | ee95f55436a1d8c2cd18a8f932adc7ac14a6b409 | |
parent | e1f3fd1d02e3f5fe6d2b6d82687c6846b8e500f8 [diff] [blame] |
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.
diff --git a/src/edit.c b/src/edit.c index 0b0d174..0b78964 100644 --- a/src/edit.c +++ b/src/edit.c
@@ -1746,8 +1746,9 @@ * 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())