annotate src/testdir/test8.in @ 12503:4d40b2644e92 v8.0.1130

patch 8.0.1130: the qf_jump() function is still too long commit https://github.com/vim/vim/commit/9cb03716c963338f9a98d2ebc7aa3ac8b9c1eea6 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 20 22:43:02 2017 +0200 patch 8.0.1130: the qf_jump() function is still too long Problem: The qf_jump() function is still too long. Solution: Split of parts to separate functions. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Wed, 20 Sep 2017 22:45:04 +0200
parents 1899acc5aebd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 Test for BufWritePre autocommand that deletes or unloads the buffer.
5233
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
2 Test for BufUnload autocommand that unloads all other buffers.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 STARTTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 :so small.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 :au BufWritePre Xxx1 bunload
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 :au BufWritePre Xxx2 bwipe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 /^start of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 A1:.,/end of/w! Xxx1 " write test file Xxx1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 $r2:.,/end of/w! Xxx2 " write test file Xxx2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 :e! Xxx2 " edit Xxx2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 :bdel test8.in " delete this file from the buffer list
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 :e Xxx1 " edit Xxx1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 :w " write it, will unload it and give an error msg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 :w! test.out " Write contents of this file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 :e! Xxx2 " start editing Xxx2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 :bwipe test.out " remove test.out from the buffer list
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 :w " write it, will delete the buffer and give an error msg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 :w >>test.out " Append contents of this file
5233
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
20 :au! BufWritePre
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
21 :func CloseAll()
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
22 let i = 0
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
23 while i <= bufnr('$')
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
24 if i != bufnr('%') && bufloaded(i)
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
25 exe i . "bunload"
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
26 endif
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
27 let i += 1
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
28 endwhile
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
29 endfunc
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
30 :func WriteToOut()
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
31 edit! test.out
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
32 $put ='VimLeave done'
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
33 write
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
34 endfunc
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
35 :set viminfo='100,nviminfo
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
36 :au BufUnload * call CloseAll()
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
37 :au VimLeave * call WriteToOut()
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
38 :e small.vim
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
39 :sp mbyte.vim
1899acc5aebd updated for version 7.4a.042
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
40 :q
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 :qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 start of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 test
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 end of Xxx