mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
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.
This commit is contained in:
@@ -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')) {
|
||||
|
Reference in New Issue
Block a user