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.
diff --git a/src/globals.h b/src/globals.h
index 6f2a1a5..786c850 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -32,15 +32,17 @@
* 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 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);