diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-08-27 11:28:11 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-08-29 12:05:34 +0200 |
commit | ea4e9c71ccaf406fe7aa6b47d461cdab2d6c01e9 (patch) | |
tree | d8c14449741cdfcbf3fcb65d518a7ee0a15a70bb /src/nvim/regexp.c | |
parent | 7a9b5937966d3db852c84b8eb232e77d92d3c355 (diff) | |
download | rneovim-ea4e9c71ccaf406fe7aa6b47d461cdab2d6c01e9.tar.gz rneovim-ea4e9c71ccaf406fe7aa6b47d461cdab2d6c01e9.tar.bz2 rneovim-ea4e9c71ccaf406fe7aa6b47d461cdab2d6c01e9.zip |
refactor(plines): use a struct for chartabsize state
This is a refactor extracted from vim-patch 9.0.0067: cannot show virtual text
The logic for inline virtual text is going to be different in nvim than
text property based text in vim, but this refactor is still useful,
as calculation of displayed linesize is going to be stateful in a
similar way.
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index b7ec4bf94e..75bd7b4cc1 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -1165,7 +1165,7 @@ static bool reg_match_visual(void) rex.line = reg_getline(rex.lnum); rex.input = rex.line + col; - unsigned int cols_u = win_linetabsize(wp, rex.line, col); + unsigned int cols_u = win_linetabsize(wp, rex.reg_firstlnum + rex.lnum, rex.line, col); assert(cols_u <= MAXCOL); colnr_T cols = (colnr_T)cols_u; if (cols < start || cols > end - (*p_sel == 'e')) { |