Mercurial > vim
comparison src/globals.h @ 29413:34e93e046526 v9.0.0048
patch 9.0.0048: cursor in wrong column with mouse click after concealed text
Commit: https://github.com/vim/vim/commit/b90818867c089d4987f1a48ee3666674826d6f4b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 9 04:56:24 2022 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 09 Jul 2022 06:00:06 +0200 |
parents | 9dce192d1ac2 |
children | 6f9e21c30d7e |
comparison
equal
deleted
inserted
replaced
29412:afeb72fa8cd9 | 29413:34e93e046526 |
---|---|
30 | 30 |
31 /* | 31 /* |
32 * The characters that are currently on the screen are kept in ScreenLines[]. | 32 * The characters that are currently on the screen are kept in ScreenLines[]. |
33 * It is a single block of characters, the size of the screen plus one line. | 33 * It is a single block of characters, the size of the screen plus one line. |
34 * The attributes for those characters are kept in ScreenAttrs[]. | 34 * The attributes for those characters are kept in ScreenAttrs[]. |
35 * The byte offset in the line is kept in ScreenCols[]. | |
35 * | 36 * |
36 * "LineOffset[n]" is the offset from ScreenLines[] for the start of line 'n'. | 37 * "LineOffset[n]" is the offset from ScreenLines[] for the start of line 'n'. |
37 * The same value is used for ScreenLinesUC[] and ScreenAttrs[]. | 38 * The same value is used for ScreenLinesUC[], ScreenAttrs[] and ScreenCols[]. |
38 * | 39 * |
39 * Note: before the screen is initialized and when out of memory these can be | 40 * Note: before the screen is initialized and when out of memory these can be |
40 * NULL. | 41 * NULL. |
41 */ | 42 */ |
42 EXTERN schar_T *ScreenLines INIT(= NULL); | 43 EXTERN schar_T *ScreenLines INIT(= NULL); |
43 EXTERN sattr_T *ScreenAttrs INIT(= NULL); | 44 EXTERN sattr_T *ScreenAttrs INIT(= NULL); |
45 EXTERN colnr_T *ScreenCols INIT(= NULL); | |
44 EXTERN unsigned *LineOffset INIT(= NULL); | 46 EXTERN unsigned *LineOffset INIT(= NULL); |
45 EXTERN char_u *LineWraps INIT(= NULL); // line wraps to next line | 47 EXTERN char_u *LineWraps INIT(= NULL); // line wraps to next line |
46 | 48 |
47 /* | 49 /* |
48 * When using Unicode characters (in UTF-8 encoding) the character in | 50 * When using Unicode characters (in UTF-8 encoding) the character in |
60 // Only used for euc-jp: Second byte of a character that starts with 0x8e. | 62 // Only used for euc-jp: Second byte of a character that starts with 0x8e. |
61 // These are single-width. | 63 // These are single-width. |
62 EXTERN schar_T *ScreenLines2 INIT(= NULL); | 64 EXTERN schar_T *ScreenLines2 INIT(= NULL); |
63 | 65 |
64 /* | 66 /* |
65 * Buffer for one screen line (characters and attributes). | 67 * One screen line to be displayed. Points into ScreenLines. |
66 */ | 68 */ |
67 EXTERN schar_T *current_ScreenLine INIT(= NULL); | 69 EXTERN schar_T *current_ScreenLine INIT(= NULL); |
68 | 70 |
69 /* | 71 /* |
70 * Last known cursor position. | 72 * Last known cursor position. |