diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-17 22:35:26 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-08-17 22:35:26 +0200 |
commit | e500ae8e29ad921378085f5d70ee5c0c537be1ba (patch) | |
tree | b0359471c2dd4bb6920edc9b98107e3730eff8a9 /src/globals.h | |
parent | 2261c89a49ff2115e1ccc9ab9211e9f0d5a37578 (diff) |
patch 9.0.1725: cursor pos wrong after concealed text with 'virtualedit'v9.0.1725
Problem: Wrong cursor position when clicking after concealed text
with 'virtualedit'.
Solution: Store virtual columns in ScreenCols[] instead of text
columns, and always use coladvance() when clicking.
This also fixes incorrect curswant when clicking on a TAB, so now
Test_normal_click_on_ctrl_char() asserts the same results as the ones
before patch 9.0.0048.
closes: #12808
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'src/globals.h')
-rw-r--r-- | src/globals.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/globals.h b/src/globals.h index 6a68c3acbb..c1e2d6fbc4 100644 --- a/src/globals.h +++ b/src/globals.h @@ -32,7 +32,7 @@ EXTERN long Columns INIT(= 80); // nr of columns in the screen * The characters that are currently on the screen are kept in ScreenLines[]. * It is a single block of characters, the size of the screen plus one line. * The attributes for those characters are kept in ScreenAttrs[]. - * The byte offset in the line is kept in ScreenCols[]. + * The virtual column in the line is kept in ScreenCols[]. * * "LineOffset[n]" is the offset from ScreenLines[] for the start of line 'n'. * The same value is used for ScreenLinesUC[], ScreenAttrs[] and ScreenCols[]. |