annotate src/testdir/test_search_stat.vim @ 16696:b1756c303066 v8.1.1350

patch 8.1.1350: "W" for wrapping not shown when more than 99 matches commit https://github.com/vim/vim/commit/dc6855af974f2ef553aceee619fadcb858e25d39 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 18 19:26:29 2019 +0200 patch 8.1.1350: "W" for wrapping not shown when more than 99 matches Problem: "W" for wrapping not shown when more than 99 matches. Solution: Adjust check for length. (Masato Nishihata, closes https://github.com/vim/vim/issues/4388)
author Bram Moolenaar <Bram@vim.org>
date Sat, 18 May 2019 19:30:10 +0200
parents 2c2f5f0173c1
children 73ff6357da5b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16533
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Tests for search_stats, when "S" is not in 'shortmess'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 "
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " This test is fragile, it might not work interactively, but it works when run
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " as test!
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
16560
8d0ea09e2d81 patch 8.1.1283: delaying half a second after the top-bot message
Bram Moolenaar <Bram@vim.org>
parents: 16533
diff changeset
6 source shared.vim
8d0ea09e2d81 patch 8.1.1283: delaying half a second after the top-bot message
Bram Moolenaar <Bram@vim.org>
parents: 16533
diff changeset
7
16533
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 func! Test_search_stat()
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 new
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 set shortmess-=S
16570
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
11 " Append 50 lines with text to search for, "foobar" appears 20 times
16533
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 call append(0, repeat(['foobar', 'foo', 'fooooobar', 'foba', 'foobar'], 10))
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 " 1) match at second line
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 call cursor(1, 1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 let @/ = 'fo*\(bar\?\)\?'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 let g:a = execute(':unsilent :norm! n')
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 let stat = '\[2/50\]'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 let pat = escape(@/, '()*?'). '\s\+'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 call assert_match(pat .. stat, g:a)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 " 2) Match at last line
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 call cursor(line('$')-2, 1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 let g:a = execute(':unsilent :norm! n')
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 let stat = '\[50/50\]'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 call assert_match(pat .. stat, g:a)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 " 3) No search stat
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 set shortmess+=S
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 call cursor(1, 1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 let stat = '\[2/50\]'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 let g:a = execute(':unsilent :norm! n')
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 call assert_notmatch(pat .. stat, g:a)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 set shortmess-=S
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 " 4) Many matches
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 call cursor(line('$')-2, 1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 let @/ = '.'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 let pat = escape(@/, '()*?'). '\s\+'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 let g:a = execute(':unsilent :norm! n')
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 let stat = '\[>99/>99\]'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 call assert_match(pat .. stat, g:a)
16696
b1756c303066 patch 8.1.1350: "W" for wrapping not shown when more than 99 matches
Bram Moolenaar <Bram@vim.org>
parents: 16570
diff changeset
43 call cursor(line('$'), 1)
b1756c303066 patch 8.1.1350: "W" for wrapping not shown when more than 99 matches
Bram Moolenaar <Bram@vim.org>
parents: 16570
diff changeset
44 let g:a = execute(':unsilent :norm! n')
b1756c303066 patch 8.1.1350: "W" for wrapping not shown when more than 99 matches
Bram Moolenaar <Bram@vim.org>
parents: 16570
diff changeset
45 let stat = '\[1/>99\] W'
b1756c303066 patch 8.1.1350: "W" for wrapping not shown when more than 99 matches
Bram Moolenaar <Bram@vim.org>
parents: 16570
diff changeset
46 call assert_match(pat .. stat, g:a)
16533
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 " 5) Many matches
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 call cursor(1, 1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 let g:a = execute(':unsilent :norm! n')
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 let stat = '\[2/>99\]'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 call assert_match(pat .. stat, g:a)
16696
b1756c303066 patch 8.1.1350: "W" for wrapping not shown when more than 99 matches
Bram Moolenaar <Bram@vim.org>
parents: 16570
diff changeset
53 call cursor(1, 1)
b1756c303066 patch 8.1.1350: "W" for wrapping not shown when more than 99 matches
Bram Moolenaar <Bram@vim.org>
parents: 16570
diff changeset
54 let g:a = execute(':unsilent :norm! N')
b1756c303066 patch 8.1.1350: "W" for wrapping not shown when more than 99 matches
Bram Moolenaar <Bram@vim.org>
parents: 16570
diff changeset
55 let stat = '\[>99/>99\] W'
b1756c303066 patch 8.1.1350: "W" for wrapping not shown when more than 99 matches
Bram Moolenaar <Bram@vim.org>
parents: 16570
diff changeset
56 call assert_match(pat .. stat, g:a)
16533
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 " 6) right-left
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 if exists("+rightleft")
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 set rl
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 call cursor(1,1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 let @/ = 'foobar'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 let pat = 'raboof/\s\+'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 let g:a = execute(':unsilent :norm! n')
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 let stat = '\[20/2\]'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 call assert_match(pat .. stat, g:a)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 set norl
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 endif
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 " 7) right-left bottom
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 if exists("+rightleft")
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 set rl
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 call cursor('$',1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 let pat = 'raboof?\s\+'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 let g:a = execute(':unsilent :norm! N')
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 let stat = '\[20/20\]'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 call assert_match(pat .. stat, g:a)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 set norl
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 endif
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 " 8) right-left back at top
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 if exists("+rightleft")
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 set rl
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 call cursor('$',1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 let pat = 'raboof/\s\+'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 let g:a = execute(':unsilent :norm! n')
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87 let stat = '\[20/1\]'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 call assert_match(pat .. stat, g:a)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 call assert_match('search hit BOTTOM, continuing at TOP', g:a)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90 set norl
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91 endif
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92
16560
8d0ea09e2d81 patch 8.1.1283: delaying half a second after the top-bot message
Bram Moolenaar <Bram@vim.org>
parents: 16533
diff changeset
93 " 9) normal, back at bottom
16533
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
94 call cursor(1,1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
95 let @/ = 'foobar'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
96 let pat = '?foobar\s\+'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
97 let g:a = execute(':unsilent :norm! N')
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
98 let stat = '\[20/20\]'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
99 call assert_match(pat .. stat, g:a)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
100 call assert_match('search hit TOP, continuing at BOTTOM', g:a)
16560
8d0ea09e2d81 patch 8.1.1283: delaying half a second after the top-bot message
Bram Moolenaar <Bram@vim.org>
parents: 16533
diff changeset
101 call assert_match('\[20/20\] W', Screenline(&lines))
16533
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
102
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
103 " 10) normal, no match
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
104 call cursor(1,1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
105 let @/ = 'zzzzzz'
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
106 let g:a = ''
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
107 try
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
108 let g:a = execute(':unsilent :norm! n')
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
109 catch /^Vim\%((\a\+)\)\=:E486/
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
110 let stat = ''
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
111 " error message is not redir'ed to g:a, it is empty
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
112 call assert_true(empty(g:a))
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
113 catch
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
114 call assert_false(1)
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
115 endtry
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
116
16570
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
117 " 11) normal, n comes from a mapping
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
118 " Need to move over more than 64 lines to trigger char_avail(.
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
119 nnoremap n nzv
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
120 call cursor(1,1)
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
121 call append(50, repeat(['foobar', 'foo', 'fooooobar', 'foba', 'foobar'], 10))
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
122 call setline(2, 'find this')
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
123 call setline(70, 'find this')
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
124 let @/ = 'find this'
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
125 let pat = '/find this\s\+'
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
126 let g:a = execute(':unsilent :norm n')
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
127 " g:a will contain several lines
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
128 let g:b = split(g:a, "\n")[-1]
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
129 let stat = '\[1/2\]'
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
130 call assert_match(pat .. stat, g:b)
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
131 unmap n
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
132
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
133 " 11) normal, but silent
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
134 call cursor(1,1)
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
135 let @/ = 'find this'
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
136 let pat = '/find this\s\+'
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
137 let g:a = execute(':norm! n')
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
138 let stat = '\[1/2\]'
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
139 call assert_notmatch(pat .. stat, g:a)
2c2f5f0173c1 patch 8.1.1288: search stats don't show for mapped command
Bram Moolenaar <Bram@vim.org>
parents: 16560
diff changeset
140
16533
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
141 " close the window
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
142 set shortmess+=S
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
143 bwipe!
5e25171e0e75 patch 8.1.1270: cannot see current match position
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
144 endfunc