diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-07-09 04:56:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-09 04:56:24 +0100 |
commit | b90818867c089d4987f1a48ee3666674826d6f4b (patch) | |
tree | e56211c21510cf77f5843aab008901ed410b7df6 /src/globals.h | |
parent | fee0c4aa99eb0a7a801dade758ce5e04b48c15d1 (diff) | |
download | vim-git-b90818867c089d4987f1a48ee3666674826d6f4b.tar.gz |
patch 9.0.0048: cursor in wrong column with mouse click after concealed textv9.0.0048
Problem: Cursor in wrong column with mouse click after concealed text.
Solution: Store the text column when drawing text.
Diffstat (limited to 'src/globals.h')
-rw-r--r-- | src/globals.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/globals.h b/src/globals.h index 6f2a1a5cd..786c850d3 100644 --- a/src/globals.h +++ b/src/globals.h @@ -32,15 +32,17 @@ 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[]. * * "LineOffset[n]" is the offset from ScreenLines[] for the start of line 'n'. - * The same value is used for ScreenLinesUC[] and ScreenAttrs[]. + * The same value is used for ScreenLinesUC[], ScreenAttrs[] and ScreenCols[]. * * Note: before the screen is initialized and when out of memory these can be * NULL. */ EXTERN schar_T *ScreenLines INIT(= NULL); EXTERN sattr_T *ScreenAttrs INIT(= NULL); +EXTERN colnr_T *ScreenCols INIT(= NULL); EXTERN unsigned *LineOffset INIT(= NULL); EXTERN char_u *LineWraps INIT(= NULL); // line wraps to next line @@ -62,7 +64,7 @@ EXTERN int Screen_mco INIT(= 0); // value of p_mco used when EXTERN schar_T *ScreenLines2 INIT(= NULL); /* - * Buffer for one screen line (characters and attributes). + * One screen line to be displayed. Points into ScreenLines. */ EXTERN schar_T *current_ScreenLine INIT(= NULL); |