changeset 29379:4ad168b282bd v9.0.0032

patch 9.0.0032: in the quickfix window 'cursorline' overrules QuickFixLine Commit: https://github.com/vim/vim/commit/7fe956d17650b231f173868531bc7466010687f0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 3 14:21:09 2022 +0100 patch 9.0.0032: in the quickfix window 'cursorline' overrules QuickFixLine Problem: In the quickfix window 'cursorline' overrules QuickFixLine highlighting. Solution: Combine the attributes. Add a test. (closes #10654)
author Bram Moolenaar <Bram@vim.org>
date Sun, 03 Jul 2022 15:30:03 +0200
parents 2bb0b6cb903f
children 9a01e19b2202
files src/drawline.c src/testdir/dumps/Test_quickfix_cwindow_3.dump src/testdir/dumps/Test_quickfix_cwindow_4.dump src/testdir/test_quickfix.vim src/version.c
diffstat 5 files changed, 36 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -970,7 +970,11 @@ win_line(
 		}
 		else
 # endif
+# if defined(FEAT_QUICKFIX)
+		    line_attr = hl_combine_attr(line_attr, cul_attr);
+# else
 		    line_attr = cul_attr;
+# endif
 	    }
 	    else
 	    {
new file mode 100644
--- /dev/null
+++ b/src/testdir/dumps/Test_quickfix_cwindow_3.dump
@@ -0,0 +1,12 @@
+|s+0&#ffffff0|o|m|e| @70
+|t|e|x|t| @70
+|w|i|t|h| @70
+|m|a|t|c|h|e|s| @67
+|~+0#4040ff13&| @73
+|X+1#0000000&|C|w|i|n|d|o|w| @48|2|,|2| @11|A|l@1
+|X+0#0000e05&|C|w|i|n|d|o|w||+0#0000000&|1+0#af5f00255&| |c|o|l| |4|-|5||+0#0000000&| |s|o|m|e| @50
+>X+8#0000e05#ffff4012|C|w|i|n|d|o|w||+8#0000000&|2+8#af5f00255&| |c|o|l| |2|-|3||+8#0000000&| |t|e|x|t| @50
+|X+0#0000e05#ffffff0|C|w|i|n|d|o|w||+0#0000000&|4+0#af5f00255&| |c|o|l| |6|-|7||+0#0000000&| |m|a|t|c|h|e|s| @47
+|~+0#4040ff13&| @73
+|[+3#0000000&|Q|u|i|c|k|f|i|x| |L|i|s|t|]| |:|v|i|m|g|r|e|p| |e| |X|C|w|i|n|d|o|w| @20|2|,|1| @12|A|l@1
+|:+0&&|s|e|t| |c|u|r|s|o|r|l|i|n|e| @59
new file mode 100644
--- /dev/null
+++ b/src/testdir/dumps/Test_quickfix_cwindow_4.dump
@@ -0,0 +1,12 @@
+|s+0&#ffffff0|o|m|e| @70
+|t|e|x|t| @70
+|w|i|t|h| @70
+|m|a|t|c|h|e|s| @67
+|~+0#4040ff13&| @73
+|X+1#0000000&|C|w|i|n|d|o|w| @48|2|,|2| @11|A|l@1
+|X+0#0000e05&|C|w|i|n|d|o|w||+0#0000000&|1+0#af5f00255&| |c|o|l| |4|-|5||+0#0000000&| |s|o|m|e| @50
+|X+0#0000e05#ffff4012|C|w|i|n|d|o|w||+0#0000000&|2+0#af5f00255&| |c|o|l| |2|-|3||+0#0000000&| |t|e|x|t| @50
+>X+8#0000e05#ffffff0|C|w|i|n|d|o|w||+8#0000000&|4+8#af5f00255&| |c|o|l| |6|-|7||+8#0000000&| |m|a|t|c|h|e|s| @47
+|~+0#4040ff13&| @73
+|[+3#0000000&|Q|u|i|c|k|f|i|x| |L|i|s|t|]| |:|v|i|m|g|r|e|p| |e| |X|C|w|i|n|d|o|w| @20|3|,|1| @12|A|l@1
+|:+0&&|s|e|t| |c|u|r|s|o|r|l|i|n|e| @59
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -3136,6 +3136,12 @@ func Test_cwindow_highlight()
   call term_sendkeys(buf, ":cnext\<CR>")
   call VerifyScreenDump(buf, 'Test_quickfix_cwindow_2', {})
 
+  call term_sendkeys(buf, "\<C-W>j:set cursorline\<CR>")
+  call VerifyScreenDump(buf, 'Test_quickfix_cwindow_3', {})
+
+  call term_sendkeys(buf, "j")
+  call VerifyScreenDump(buf, 'Test_quickfix_cwindow_4', {})
+
   " clean up
   call StopVimInTerminal(buf)
   call delete('XtestCwindow')
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    32,
+/**/
     31,
 /**/
     30,