]> granicus.if.org Git - vim/commitdiff
patch 9.0.0032: in the quickfix window 'cursorline' overrules QuickFixLine v9.0.0032
authorBram Moolenaar <Bram@vim.org>
Sun, 3 Jul 2022 13:21:09 +0000 (14:21 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 3 Jul 2022 13:21:09 +0000 (14:21 +0100)
Problem:    In the quickfix window 'cursorline' overrules QuickFixLine
            highlighting.
Solution:   Combine the attributes.  Add a test. (closes #10654)

src/drawline.c
src/testdir/dumps/Test_quickfix_cwindow_3.dump [new file with mode: 0644]
src/testdir/dumps/Test_quickfix_cwindow_4.dump [new file with mode: 0644]
src/testdir/test_quickfix.vim
src/version.c

index 51a5fbfab04414d4ad9e1ec95cc18b507df35df7..d87d800eff9919fe63f8f1f2dda326c7634d900d 100644 (file)
@@ -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
            {
diff --git a/src/testdir/dumps/Test_quickfix_cwindow_3.dump b/src/testdir/dumps/Test_quickfix_cwindow_3.dump
new file mode 100644 (file)
index 0000000..3fafbeb
--- /dev/null
@@ -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
diff --git a/src/testdir/dumps/Test_quickfix_cwindow_4.dump b/src/testdir/dumps/Test_quickfix_cwindow_4.dump
new file mode 100644 (file)
index 0000000..9baaf51
--- /dev/null
@@ -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
index 2a973754deef6142fa926e3da5b556be7936f08c..2431a46fc9c737f0125ff9fb5ab4ee0244dc1851 100644 (file)
@@ -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')
index a37840a99a59088c39fa8863c7b571422040b635..1232f4e02fcbb4548eb1ccdfa7ddde6049baf418 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    32,
 /**/
     31,
 /**/