patch 9.1.1083: "above" virtual text breaks cursorlineopt=number Commit: https://github.com/vim/vim/commit/62f19541f4215e9b31698a3e0331b0e6421a1f37 Author: zeertzjq <zeert...@outlook.com> Date: Sat Mar 8 16:27:37 2025 +0100
patch 9.1.1083: "above" virtual text breaks cursorlineopt=number 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 <zeert...@outlook.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/drawline.c b/src/drawline.c index f24e7e036..1d65f3b4a 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -461,8 +461,8 @@ handle_lnum_col( 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 diff --git a/src/testdir/dumps/Test_prop_above_number_3.dump b/src/testdir/dumps/Test_prop_above_number_3.dump new file mode 100644 index 000000000..56ce6620a --- /dev/null +++ b/src/testdir/dumps/Test_prop_above_number_3.dump @@ -0,0 +1,8 @@ +| +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| diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index bf561cae3..fe2d2df77 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -3695,6 +3695,10 @@ func Test_prop_above_with_number() 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 diff --git a/src/version.c b/src/version.c index 671ac25ad..2e6ae1f33 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1183, /**/ 1182, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1tqw7t-00Fxw3-GF%40256bit.org.