summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0344
blob: a41f532afb32a762311915fbce4033b4e37fa740 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0344
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0344
Problem:    'hlsearch' highlighting has a gap after /$.
Solution:   Remove suspicious code. (Ricky Zhou, closes #3400)
Files:	    src/screen.c, src/testdir/test_hlsearch.vim


*** ../vim-8.1.0343/src/screen.c	2018-08-26 21:23:03.400383307 +0200
--- src/screen.c	2018-09-02 15:01:39.828954706 +0200
***************
*** 5496,5510 ****
  	if (c == NUL)
  	{
  #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. */
  	    if (wp->w_p_wrap)
  		v = wp->w_skipcol;
--- 5496,5501 ----
*** ../vim-8.1.0343/src/testdir/test_hlsearch.vim	2017-06-17 20:28:35.000000000 +0200
--- src/testdir/test_hlsearch.vim	2018-09-02 15:00:49.269446213 +0200
***************
*** 4,10 ****
    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)
--- 4,9 ----
***************
*** 51,53 ****
--- 50,65 ----
    set nohlsearch redrawtime&
    bwipe!
  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
*** ../vim-8.1.0343/src/version.c	2018-09-02 14:25:02.330801508 +0200
--- src/version.c	2018-09-02 14:58:34.506763279 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     344,
  /**/

-- 
"How is your new girlfriend?"
"90-60-90 man!"
"What, pale purple?"

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///