summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0339
blob: 26ab0843fcd80c040c9a6cea9ed0a083eefea810 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0339
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.0339
Problem:    Wrong highlight when 'incsearch' set and cancelling :s.
Solution:   Reset search line range. (Hirohito Higashi, Masamichi Abe)
Files:	    src/ex_getln.c, src/testdir/test_search.vim,
            src/testdir/dumps/Test_incsearch_substitute_10.dump


*** ../vim-8.1.0338/src/ex_getln.c	2018-08-23 20:55:23.328137497 +0200
--- src/ex_getln.c	2018-08-31 22:01:54.482219518 +0200
***************
*** 436,447 ****
  	}
  	restore_viewstate(&is_state->old_viewstate);
  	highlight_match = FALSE;
  	validate_cursor();	/* needed for TAB */
  	if (call_update_screen)
  	    update_screen(SOME_VALID);
  	else
  	    redraw_all_later(SOME_VALID);
- 	p_magic = is_state->magic_save;
      }
  }
  
--- 436,453 ----
  	}
  	restore_viewstate(&is_state->old_viewstate);
  	highlight_match = FALSE;
+ 
+ 	// by default search all lines
+ 	search_first_line = 0;
+ 	search_last_line = MAXLNUM;
+ 
+ 	p_magic = is_state->magic_save;
+ 
  	validate_cursor();	/* needed for TAB */
  	if (call_update_screen)
  	    update_screen(SOME_VALID);
  	else
  	    redraw_all_later(SOME_VALID);
      }
  }
  
*** ../vim-8.1.0338/src/testdir/test_search.vim	2018-08-23 20:55:23.328137497 +0200
--- src/testdir/test_search.vim	2018-08-31 22:06:07.867638671 +0200
***************
*** 956,961 ****
--- 956,970 ----
    call VerifyScreenDump(buf, 'Test_incsearch_substitute_09', {})
    call term_sendkeys(buf, "\<Esc>")
  
+   call term_sendkeys(buf, ":set nocursorline\<CR>")
+ 
+   " All matches are highlighted for 'hlsearch' after the incsearch canceled
+   call term_sendkeys(buf, "1G*")
+   call term_sendkeys(buf, ":2,5s/foo")
+   sleep 100m
+   call term_sendkeys(buf, "\<Esc>")
+   call VerifyScreenDump(buf, 'Test_incsearch_substitute_10', {})
+ 
    call StopVimInTerminal(buf)
    call delete('Xis_subst_script')
  endfunc
*** ../vim-8.1.0338/src/testdir/dumps/Test_incsearch_substitute_10.dump	2018-08-31 22:08:36.694113050 +0200
--- src/testdir/dumps/Test_incsearch_substitute_10.dump	2018-08-31 22:01:54.482219518 +0200
***************
*** 0 ****
--- 1,9 ----
+ |f+0&#ffff4012|o@1| +0&#ffffff0|1| @64
+ >f+0&#ffff4012|o@1| +0&#ffffff0|2| @64
+ |f+0&#ffff4012|o@1| +0&#ffffff0|3| @64
+ |f+0&#ffff4012|o@1| +0&#ffffff0|4| @64
+ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
+ |f+0&#ffff4012|o@1| +0&#ffffff0|6| @64
+ |f+0&#ffff4012|o@1| +0&#ffffff0|7| @64
+ |f+0&#ffff4012|o@1| +0&#ffffff0|8| @64
+ @52|2|,|1| @10|T|o|p| 
*** ../vim-8.1.0338/src/version.c	2018-08-30 17:47:01.949560920 +0200
--- src/version.c	2018-08-31 22:08:45.178025914 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     339,
  /**/

-- 
A)bort, R)etry, D)o it right this time

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