summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0321
blob: daf15822d6b31d493073ed0153a577fd7a214ef4 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0321
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.0321 (after 8.1.0320)
Problem:    'incsearch' regression: /\v highlights everything.
Solution:   Put back the empty_pattern() check.
Files:	    src/ex_getln.c, src/testdir/test_search.vim,
            src/testdir/dumps/Test_incsearch_search_01.dump,
            src/testdir/dumps/Test_incsearch_search_02.dump


*** ../vim-8.1.0320/src/ex_getln.c	2018-08-22 23:03:19.486827548 +0200
--- src/ex_getln.c	2018-08-23 20:51:58.597337138 +0200
***************
*** 572,577 ****
--- 572,588 ----
      else
  	end_pos = curwin->w_cursor; // shutup gcc 4
  
+     // Disable 'hlsearch' highlighting if the pattern matches everything.
+     // Avoids a flash when typing "foo\|".
+     if (!use_last_pat)
+     {
+ 	next_char = ccline.cmdbuff[skiplen + patlen];
+ 	ccline.cmdbuff[skiplen + patlen] = NUL;
+ 	if (empty_pattern(ccline.cmdbuff))
+ 	    set_no_hlsearch(TRUE);
+ 	ccline.cmdbuff[skiplen + patlen] = next_char;
+     }
+ 
      validate_cursor();
      // May redraw the status line to show the cursor position.
      if (p_ru && curwin->w_status_height > 0)
*** ../vim-8.1.0320/src/testdir/test_search.vim	2018-08-22 23:03:19.486827548 +0200
--- src/testdir/test_search.vim	2018-08-23 20:51:10.061621201 +0200
***************
*** 813,818 ****
--- 813,853 ----
    call delete('Xscript')
  endfunc
  
+ func Test_incsearch_search_dump()
+   if !exists('+incsearch')
+     return
+   endif
+   if !CanRunVimInTerminal()
+     return
+   endif
+   call writefile([
+ 	\ 'set incsearch hlsearch scrolloff=0',
+ 	\ 'for n in range(1, 8)',
+ 	\ '  call setline(n, "foo " . n)',
+ 	\ 'endfor',
+ 	\ '3',
+ 	\ ], 'Xis_search_script')
+   let buf = RunVimInTerminal('-S Xis_search_script', {'rows': 9, 'cols': 70})
+   " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by
+   " the 'ambiwidth' check.
+   sleep 100m
+ 
+   " Need to send one key at a time to force a redraw.
+   call term_sendkeys(buf, '/fo')
+   sleep 100m
+   call VerifyScreenDump(buf, 'Test_incsearch_search_01', {})
+   call term_sendkeys(buf, "\<Esc>")
+   sleep 100m
+ 
+   call term_sendkeys(buf, '/\v')
+   sleep 100m
+   call VerifyScreenDump(buf, 'Test_incsearch_search_02', {})
+   call term_sendkeys(buf, "\<Esc>")
+ 
+   call StopVimInTerminal(buf)
+   call delete('Xis_search_script')
+ endfunc
+ 
  func Test_incsearch_substitute()
    if !exists('+incsearch')
      return
***************
*** 926,932 ****
  endfunc
  
  " Similar to Test_incsearch_substitute_dump() for :sort
! func Test_incsearch_ssort_dump()
    if !exists('+incsearch')
      return
    endif
--- 961,967 ----
  endfunc
  
  " Similar to Test_incsearch_substitute_dump() for :sort
! func Test_incsearch_sort_dump()
    if !exists('+incsearch')
      return
    endif
*** ../vim-8.1.0320/src/testdir/dumps/Test_incsearch_search_01.dump	2018-08-23 20:53:38.528751838 +0200
--- src/testdir/dumps/Test_incsearch_search_01.dump	2018-08-23 20:41:15.889079877 +0200
***************
*** 0 ****
--- 1,9 ----
+ |f+0&#ffff4012|o|o+0&#ffffff0| |1| @64
+ |f+0&#ffff4012|o|o+0&#ffffff0| |2| @64
+ |f+0&#ffff4012|o|o+0&#ffffff0| |3| @64
+ |f+1&&|o|o+0&&| |4| @64
+ |f+0&#ffff4012|o|o+0&#ffffff0| |5| @64
+ |f+0&#ffff4012|o|o+0&#ffffff0| |6| @64
+ |f+0&#ffff4012|o|o+0&#ffffff0| |7| @64
+ |f+0&#ffff4012|o|o+0&#ffffff0| |8| @64
+ |/|f|o> @66
*** ../vim-8.1.0320/src/testdir/dumps/Test_incsearch_search_02.dump	2018-08-23 20:53:38.536751791 +0200
--- src/testdir/dumps/Test_incsearch_search_02.dump	2018-08-23 20:52:11.605260981 +0200
***************
*** 0 ****
--- 1,9 ----
+ |f+0&#ffffff0|o@1| |1| @64
+ |f|o@1| |2| @64
+ |f|o+1&&|o+0&&| |3| @64
+ |f|o@1| |4| @64
+ |f|o@1| |5| @64
+ |f|o@1| |6| @64
+ |f|o@1| |7| @64
+ |f|o@1| |8| @64
+ |/|\|v> @66
*** ../vim-8.1.0320/src/version.c	2018-08-22 23:03:19.486827548 +0200
--- src/version.c	2018-08-23 20:53:21.256853038 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     321,
  /**/

-- 
This computer is so slow, it takes forever to execute and endless loop!

 /// 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    ///