Skip to content

Commit 7fe956d

Browse files
committed
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)
1 parent 9359e8a commit 7fe956d

5 files changed

Lines changed: 36 additions & 0 deletions

File tree

src/drawline.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,11 @@ win_line(
970970
}
971971
else
972972
# endif
973+
# if defined(FEAT_QUICKFIX)
974+
line_attr = hl_combine_attr(line_attr, cul_attr);
975+
# else
973976
line_attr = cul_attr;
977+
# endif
974978
}
975979
else
976980
{
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
|s+0&#ffffff0|o|m|e| @70
2+
|t|e|x|t| @70
3+
|w|i|t|h| @70
4+
|m|a|t|c|h|e|s| @67
5+
|~+0#4040ff13&| @73
6+
|X+1#0000000&|C|w|i|n|d|o|w| @48|2|,|2| @11|A|l@1
7+
|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
8+
>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
9+
|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
10+
|~+0#4040ff13&| @73
11+
|[+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
12+
|:+0&&|s|e|t| |c|u|r|s|o|r|l|i|n|e| @59
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
|s+0&#ffffff0|o|m|e| @70
2+
|t|e|x|t| @70
3+
|w|i|t|h| @70
4+
|m|a|t|c|h|e|s| @67
5+
|~+0#4040ff13&| @73
6+
|X+1#0000000&|C|w|i|n|d|o|w| @48|2|,|2| @11|A|l@1
7+
|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
8+
|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
9+
>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
10+
|~+0#4040ff13&| @73
11+
|[+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
12+
|:+0&&|s|e|t| |c|u|r|s|o|r|l|i|n|e| @59

src/testdir/test_quickfix.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3136,6 +3136,12 @@ func Test_cwindow_highlight()
31363136
call term_sendkeys(buf, ":cnext\<CR>")
31373137
call VerifyScreenDump(buf, 'Test_quickfix_cwindow_2', {})
31383138

3139+
call term_sendkeys(buf, "\<C-W>j:set cursorline\<CR>")
3140+
call VerifyScreenDump(buf, 'Test_quickfix_cwindow_3', {})
3141+
3142+
call term_sendkeys(buf, "j")
3143+
call VerifyScreenDump(buf, 'Test_quickfix_cwindow_4', {})
3144+
31393145
" clean up
31403146
call StopVimInTerminal(buf)
31413147
call delete('XtestCwindow')

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,8 @@ static char *(features[]) =
735735

736736
static int included_patches[] =
737737
{ /* Add new patch number below this line */
738+
/**/
739+
32,
738740
/**/
739741
31,
740742
/**/

0 commit comments

Comments
 (0)