diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-18 20:02:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-18 20:02:40 +0800 |
commit | b9e75e575148b956190eb017bb1f6a492d6902ae (patch) | |
tree | dc596952a745fc70544f15b5751dff122a3392c7 /src/nvim/grid_defs.h | |
parent | 81d5550d77d24a924e8c23873fccbf405bc39447 (diff) | |
parent | 1d3d50e8f0e1c3438ad77a8727ad8d3f1333c79a (diff) | |
download | rneovim-b9e75e575148b956190eb017bb1f6a492d6902ae.tar.gz rneovim-b9e75e575148b956190eb017bb1f6a492d6902ae.tar.bz2 rneovim-b9e75e575148b956190eb017bb1f6a492d6902ae.zip |
Merge pull request #24780 from zeertzjq/vim-9.0.0048
vim-patch:9.0.{0048,0177,1705,1725}: mouse click after concealed text
Diffstat (limited to 'src/nvim/grid_defs.h')
-rw-r--r-- | src/nvim/grid_defs.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/nvim/grid_defs.h b/src/nvim/grid_defs.h index aae61cc719..aeaadea73c 100644 --- a/src/nvim/grid_defs.h +++ b/src/nvim/grid_defs.h @@ -5,6 +5,7 @@ #include <stddef.h> #include <stdint.h> +#include "nvim/pos.h" #include "nvim/types.h" #define MAX_MCO 6 // fixed value for 'maxcombine' @@ -37,9 +38,14 @@ enum { /// screen is cleared, the cells should be filled with a single whitespace char. /// /// attrs[] contains the highlighting attribute for each cell. -/// line_offset[n] is the offset from chars[] and attrs[] for the -/// start of line 'n'. These offsets are in general not linear, as full screen -/// scrolling is implemented by rotating the offsets in the line_offset array. +/// +/// vcols[] countain the virtual columns in the line. -1 means not available +/// (below last line), MAXCOL means after the end of the line. +/// +/// line_offset[n] is the offset from chars[], attrs[] and vcols[] for the start +/// of line 'n'. These offsets are in general not linear, as full screen scrolling +/// is implemented by rotating the offsets in the line_offset array. +/// /// line_wraps[] is an array of boolean flags indicating if the screen line /// wraps to the next line. It can only be true if a window occupies the entire /// screen width. @@ -49,6 +55,7 @@ struct ScreenGrid { schar_T *chars; sattr_T *attrs; + colnr_T *vcols; size_t *line_offset; char *line_wraps; @@ -106,7 +113,7 @@ struct ScreenGrid { bool comp_disabled; }; -#define SCREEN_GRID_INIT { 0, NULL, NULL, NULL, NULL, NULL, 0, 0, false, \ +#define SCREEN_GRID_INIT { 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, false, \ false, 0, 0, NULL, false, true, 0, \ 0, 0, 0, 0, 0, false } |