summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0276
blob: 469907c7a0d59799f468a825b31665f12c23bbd5 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0276
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.0276
Problem:    No test for 'incsearch' highlighting with :s.
Solution:   Add a screendump test.
Files:	    src/testdir/test_search.vim,
            src/testdir/dumps/Test_incsearch_substitute_01.dump


*** ../vim-8.1.0275/src/testdir/test_search.vim	2018-08-12 15:49:33.555438382 +0200
--- src/testdir/test_search.vim	2018-08-12 16:25:27.296040799 +0200
***************
*** 818,823 ****
--- 818,858 ----
    call Incsearch_cleanup()
  endfunc
  
+ " Similar to Test_incsearch_substitute() but with a screendump halfway.
+ func Test_incsearch_substitute_dump()
+   if !exists('+incsearch')
+     return
+   endif
+   if !CanRunVimInTerminal()
+     return
+   endif
+   call writefile([
+ 	\ 'set incsearch hlsearch scrolloff=0',
+ 	\ 'for n in range(1, 10)',
+ 	\ '  call setline(n, "foo " . n)',
+ 	\ 'endfor',
+ 	\ '3',
+ 	\ ], 'Xis_subst_script')
+   let buf = RunVimInTerminal('-S Xis_subst_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, ':.,.+2s/')
+   sleep 100m
+   call term_sendkeys(buf, 'f')
+   sleep 100m
+   call term_sendkeys(buf, 'o')
+   sleep 100m
+   call term_sendkeys(buf, 'o')
+   call VerifyScreenDump(buf, 'Test_incsearch_substitute_01', {})
+ 
+   call term_sendkeys(buf, "\<Esc>")
+   call StopVimInTerminal(buf)
+   call delete('Xis_subst_script')
+ endfunc
+ 
  func Test_search_undefined_behaviour()
    if !has("terminal")
      return
*** ../vim-8.1.0275/src/testdir/dumps/Test_incsearch_substitute_01.dump	2018-08-12 16:26:20.299815699 +0200
--- src/testdir/dumps/Test_incsearch_substitute_01.dump	2018-08-12 16:14:00.068277624 +0200
***************
*** 0 ****
--- 1,9 ----
+ |f+0&#ffffff0|o@1| |1| @64
+ |f|o@1| |2| @64
+ |f+1&&|o@1| +0&&|3| @64
+ |f+0&#ffff4012|o@1| +0&#ffffff0|4| @64
+ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
+ |f|o@1| |6| @64
+ |f|o@1| |7| @64
+ |f|o@1| |8| @64
+ |:|.|,|.|+|2|s|/|f|o@1> @58
*** ../vim-8.1.0275/src/version.c	2018-08-12 15:49:33.555438382 +0200
--- src/version.c	2018-08-12 16:25:53.031933127 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     276,
  /**/

-- 
It is illegal for anyone to give lighted cigars to dogs, cats, and other
domesticated animal kept as pets.
		[real standing law in Illinois, United States of America]

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