mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.0.0675: 'colorcolumn' has a higher priority than 'hlsearch'
Problem: 'colorcolumn' has a higher priority than 'hlsearch', it should be the other way around. (Nazri Ramliy) Solution: Change the priorities. (LemonBoy, closes #1794)
This commit is contained in:
parent
5d7be4f0fa
commit
774e5a9673
@ -5502,7 +5502,8 @@ win_line(
|
|||||||
* Also highlight the 'colorcolumn' if it is different than
|
* Also highlight the 'colorcolumn' if it is different than
|
||||||
* 'cursorcolumn' */
|
* 'cursorcolumn' */
|
||||||
vcol_save_attr = -1;
|
vcol_save_attr = -1;
|
||||||
if (draw_state == WL_LINE && !lnum_in_visual_area)
|
if (draw_state == WL_LINE && !lnum_in_visual_area
|
||||||
|
&& search_attr == 0 && area_attr == 0)
|
||||||
{
|
{
|
||||||
if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol
|
if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol
|
||||||
&& lnum != wp->w_cursor.lnum)
|
&& lnum != wp->w_cursor.lnum)
|
||||||
|
@ -194,6 +194,21 @@ func Test_multibyte_sign_and_colorcolumn()
|
|||||||
call s:close_windows()
|
call s:close_windows()
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_colorcolumn_priority()
|
||||||
|
call s:test_windows('setl cc=4 cuc hls')
|
||||||
|
call setline(1, ["xxyy", ""])
|
||||||
|
norm! gg
|
||||||
|
exe "normal! /xxyy\<CR>"
|
||||||
|
norm! G
|
||||||
|
redraw!
|
||||||
|
let line_attr = s:screen_attr(1, [1, &cc])
|
||||||
|
" Search wins over CursorColumn
|
||||||
|
call assert_equal(line_attr[1], line_attr[0])
|
||||||
|
" Search wins over Colorcolumn
|
||||||
|
call assert_equal(line_attr[2], line_attr[3])
|
||||||
|
call s:close_windows('setl hls&vim')
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_illegal_byte_and_breakat()
|
func Test_illegal_byte_and_breakat()
|
||||||
call s:test_windows("setl sbr= brk+=<")
|
call s:test_windows("setl sbr= brk+=<")
|
||||||
vert resize 18
|
vert resize 18
|
||||||
|
@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
675,
|
||||||
/**/
|
/**/
|
||||||
674,
|
674,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user