diff options
-rw-r--r-- | src/nvim/screen.c | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_hlsearch.vim | 14 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 91840026a5..81911fb928 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3916,14 +3916,6 @@ win_line ( * At end of the text line. */ if (c == NUL) { - 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. */ if (wp->w_p_wrap) v = wp->w_skipcol; diff --git a/src/nvim/testdir/test_hlsearch.vim b/src/nvim/testdir/test_hlsearch.vim index 066fdd0250..1fc7b04f88 100644 --- a/src/nvim/testdir/test_hlsearch.vim +++ b/src/nvim/testdir/test_hlsearch.vim @@ -4,7 +4,6 @@ function! Test_hlsearch() new call setline(1, repeat(['aaa'], 10)) set hlsearch nolazyredraw - let r=[] " redraw is needed to make hlsearch highlight the matches exe "normal! /aaa\<CR>" | redraw let r1 = screenattr(1, 1) @@ -32,3 +31,16 @@ function! Test_hlsearch() call getchar(1) enew! endfunction + +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 |