mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.0344: 'hlsearch' highlighting has a gap after /$
Problem: 'hlsearch' highlighting has a gap after /$. Solution: Remove suspicious code. (Ricky Zhou, closes #3400)
This commit is contained in:
parent
3c5b8cd254
commit
7ee3f15b21
@ -5496,15 +5496,6 @@ win_line(
|
|||||||
if (c == NUL)
|
if (c == NUL)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_SYN_HL
|
#ifdef FEAT_SYN_HL
|
||||||
if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol
|
|
||||||
&& lnum == wp->w_cursor.lnum)
|
|
||||||
{
|
|
||||||
/* highlight last char after line */
|
|
||||||
--col;
|
|
||||||
--off;
|
|
||||||
--vcol;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Highlight 'cursorcolumn' & 'colorcolumn' past end of the line. */
|
/* Highlight 'cursorcolumn' & 'colorcolumn' past end of the line. */
|
||||||
if (wp->w_p_wrap)
|
if (wp->w_p_wrap)
|
||||||
v = wp->w_skipcol;
|
v = wp->w_skipcol;
|
||||||
|
@ -4,7 +4,6 @@ function! Test_hlsearch()
|
|||||||
new
|
new
|
||||||
call setline(1, repeat(['aaa'], 10))
|
call setline(1, repeat(['aaa'], 10))
|
||||||
set hlsearch nolazyredraw
|
set hlsearch nolazyredraw
|
||||||
let r=[]
|
|
||||||
" redraw is needed to make hlsearch highlight the matches
|
" redraw is needed to make hlsearch highlight the matches
|
||||||
exe "normal! /aaa\<CR>" | redraw
|
exe "normal! /aaa\<CR>" | redraw
|
||||||
let r1 = screenattr(1, 1)
|
let r1 = screenattr(1, 1)
|
||||||
@ -51,3 +50,16 @@ func Test_hlsearch_hangs()
|
|||||||
set nohlsearch redrawtime&
|
set nohlsearch redrawtime&
|
||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_hlsearch_eol_highlight()
|
||||||
|
new
|
||||||
|
call append(1, repeat([''], 9))
|
||||||
|
set hlsearch nolazyredraw
|
||||||
|
exe "normal! /$\<CR>" | redraw
|
||||||
|
let attr = screenattr(1, 1)
|
||||||
|
for row in range(2, 10)
|
||||||
|
call assert_equal(attr, screenattr(row, 1), 'in line ' . row)
|
||||||
|
endfor
|
||||||
|
set nohlsearch
|
||||||
|
bwipe!
|
||||||
|
endfunc
|
||||||
|
@ -794,6 +794,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 */
|
||||||
|
/**/
|
||||||
|
344,
|
||||||
/**/
|
/**/
|
||||||
343,
|
343,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user