• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisiona6c74689fb975f5f7f343e2545c9bb098bfce7c7 (tree)
Time2019-09-16 02:15:03
AuthorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

patch 8.1.2040: no highlighting of current line in quickfix window

Commit: https://github.com/vim/vim/commit/e00fdf35d069de4effe07125333bb9ff35b1915d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 15 19:09:42 2019 +0200

patch 8.1.2040: no highlighting of current line in quickfix window
Problem: No highlighting of current line in quickfix window.
Solution: Combine with line_attr.

Change Summary

Incremental Difference

diff -r 72312a8d592d -r a6c74689fb97 src/screen.c
--- a/src/screen.c Sun Sep 15 18:15:04 2019 +0200
+++ b/src/screen.c Sun Sep 15 19:15:03 2019 +0200
@@ -4763,14 +4763,18 @@
47634763 comb_attr, cul_attr);
47644764 else
47654765 #endif
4766+ if (line_attr)
4767+ char_attr = hl_combine_attr(
4768+ comb_attr, line_attr);
4769+ else
47664770 char_attr = comb_attr;
47674771 }
47684772 else
47694773 char_attr = hl_combine_attr(comb_attr, char_attr);
47704774 }
47714775 # ifdef FEAT_CONCEAL
4772- /* no concealing past the end of the line, it interferes
4773- * with line highlighting */
4776+ // no concealing past the end of the line, it interferes
4777+ // with line highlighting
47744778 if (c == NUL)
47754779 syntax_flags = 0;
47764780 else
diff -r 72312a8d592d -r a6c74689fb97 src/testdir/dumps/Test_quickfix_cwindow_1.dump
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/testdir/dumps/Test_quickfix_cwindow_1.dump Sun Sep 15 19:15:03 2019 +0200
@@ -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|1|,|4| @11|A|l@1
7+>X+0#0000e05#ffff4012|C|w|i|n|d|o|w||+0#0000000&|1+0#af5f00255&| |c|o|l| |4||+0#0000000&| |s|o|m|e| @52
8+|X+0#0000e05#ffffff0|C|w|i|n|d|o|w||+0#0000000&|2+0#af5f00255&| |c|o|l| |2||+0#0000000&| |t|e|x|t| @52
9+|X+0#0000e05&|C|w|i|n|d|o|w||+0#0000000&|4+0#af5f00255&| |c|o|l| |6||+0#0000000&| |m|a|t|c|h|e|s| @49
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|1|,|1| @12|A|l@1
12+| +0&&@74
diff -r 72312a8d592d -r a6c74689fb97 src/testdir/dumps/Test_quickfix_cwindow_2.dump
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/testdir/dumps/Test_quickfix_cwindow_2.dump Sun Sep 15 19:15:03 2019 +0200
@@ -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+3#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||+0#0000000&| |s|o|m|e| @52
8+|X+0#0000e05#ffff4012|C|w|i|n|d|o|w||+0#0000000&|2+0#af5f00255&| |c|o|l| |2||+0#0000000&| |t|e|x|t| @52
9+|X+0#0000e05#ffffff0|C|w|i|n|d|o|w||+0#0000000&|4+0#af5f00255&| |c|o|l| |6||+0#0000000&| |m|a|t|c|h|e|s| @49
10+|~+0#4040ff13&| @73
11+|[+1#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&&|c|n|e|x|t| @68
diff -r 72312a8d592d -r a6c74689fb97 src/testdir/test_quickfix.vim
--- a/src/testdir/test_quickfix.vim Sun Sep 15 18:15:04 2019 +0200
+++ b/src/testdir/test_quickfix.vim Sun Sep 15 19:15:03 2019 +0200
@@ -3,6 +3,8 @@
33 source check.vim
44 CheckFeature quickfix
55
6+source screendump.vim
7+
68 set encoding=utf-8
79
810 func s:setup_commands(cchar)
@@ -2428,6 +2430,30 @@
24282430 set efm&vim
24292431 endfunc
24302432
2433+func Test_cwindow_highlight()
2434+ CheckScreendump
2435+
2436+ let lines =<< trim END
2437+ set t_u7=
2438+ call setline(1, ['some', 'text', 'with', 'matches'])
2439+ write XCwindow
2440+ vimgrep e XCwindow
2441+ redraw
2442+ cwindow 4
2443+ END
2444+ call writefile(lines, 'XtestCwindow')
2445+ let buf = RunVimInTerminal('-S XtestCwindow', #{rows: 12})
2446+ call VerifyScreenDump(buf, 'Test_quickfix_cwindow_1', {})
2447+
2448+ call term_sendkeys(buf, ":cnext\<CR>")
2449+ call VerifyScreenDump(buf, 'Test_quickfix_cwindow_2', {})
2450+
2451+ " clean up
2452+ call StopVimInTerminal(buf)
2453+ call delete('XtestCwindow')
2454+ call delete('XCwindow')
2455+endfunc
2456+
24312457 func XvimgrepTests(cchar)
24322458 call s:setup_commands(a:cchar)
24332459
diff -r 72312a8d592d -r a6c74689fb97 src/version.c
--- a/src/version.c Sun Sep 15 18:15:04 2019 +0200
+++ b/src/version.c Sun Sep 15 19:15:03 2019 +0200
@@ -758,6 +758,8 @@
758758 static int included_patches[] =
759759 { /* Add new patch number below this line */
760760 /**/
761+ 2040,
762+/**/
761763 2039,
762764 /**/
763765 2038,
Show on old repository browser