0
0
mirror of https://github.com/vim/vim.git synced 2025-11-13 22:54:27 -05:00

patch 9.0.0048: cursor in wrong column with mouse click after concealed text

Problem:    Cursor in wrong column with mouse click after concealed text.
Solution:   Store the text column when drawing text.
This commit is contained in:
Bram Moolenaar
2022-07-09 04:56:24 +01:00
parent fee0c4aa99
commit b90818867c
6 changed files with 142 additions and 43 deletions

View File

@@ -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);