Problem: "above" virtual text breaks cursorlineopt=number.
Solution: Take "above" virtual text into account when applying
CursorLineNr highlight.
fixes: #16828
closes: #16829
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
if (wp->w_p_cul
&& wlv->lnum == wp->w_cursor.lnum
&& (wp->w_p_culopt_flags & CULOPT_NBR)
- && (wlv->row == wlv->startrow + wlv->filler_lines
- || (wlv->row > wlv->startrow + wlv->filler_lines
+ && (wlv->row == lnum_row
+ || (wlv->row > lnum_row
&& (wp->w_p_culopt_flags & CULOPT_LINE))))
wlv->char_attr = hl_combine_attr(wlv->wcr_attr, HL_ATTR(HLF_CLN));
#endif
--- /dev/null
+| +0#af5f00255#ffffff0@1|1| |o+0#0000000&|n|e| |o|n|e| |o|n|e| @59
+| +0#af5f00255&@3|a+0#0000000#ffd7ff255|b|o|v|e| |t|h|e| |t|e|x|t| +0&#ffffff0@56
+| +0#af5f00255&@3|a+0#0000000#ffd7ff255|l|s|o| |a|b|o|v|e| |t|h|e| |t|e|x|t| +0&#ffffff0@47> @3
+| +8#af5f00255&@1|2| |t+0#0000000&|w|o| |t|w|o| |t|w|o| @59
+| +0#af5f00255&@1|3| |t+0#0000000&|h|r|e@1| |t|h|r|e@1| |t|h|r|e@1| @53
+|~+0#4040ff13&| @73
+|~| @73
+|:+0#0000000&|s|e|t|l|o|c|a|l| |c|u|r|s|o|r|l|i|n|e| |c|u|r|s|o|r|l|i|n|e|o|p|t|=|n|u|m|b|e|r| @15|2|,|1|-|1|4|3| @6|A|l@1|
call term_sendkeys(buf, ":call OneMore()\<CR>")
call VerifyScreenDump(buf, 'Test_prop_above_number_2', {})
+ call term_sendkeys(buf, ":setlocal cursorline cursorlineopt=number\<CR>")
+ call term_sendkeys(buf, 'j')
+ call VerifyScreenDump(buf, 'Test_prop_above_number_3', {})
+
call StopVimInTerminal(buf)
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1183,
/**/
1182,
/**/