Mercurial > vim
annotate src/testdir/test31.in @ 9875:42adbf172ecd v7.4.2212
commit https://github.com/vim/vim/commit/e59215c7dcae17b03daf39517560cfaa03314f5a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 14 19:08:45 2016 +0200
patch 7.4.2212
Problem: Mark " is not set when closing a window in another tab. (Guraga)
Solution: Check all tabs for the window to be valid. (based on patch by
Hirohito Higashi, closes https://github.com/vim/vim/issues/974)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 14 Aug 2016 19:15:05 +0200 |
parents | ef60fac8f3eb |
children |
rev | line source |
---|---|
7 | 1 Test for commands that close windows and/or buffers: |
2 :quit | |
3 :close | |
4 :hide | |
5 :only | |
6 :sall | |
7 :all | |
8 :ball | |
9 :buf | |
10 :edit | |
11 | |
12 STARTTEST | |
7473
ef60fac8f3eb
commit https://github.com/vim/vim/commit/d798af8c77cf47dba74b6b69ae4eba904023981c
Christian Brabandt <cb@256bit.org>
parents:
7469
diff
changeset
|
13 :so small.vim |
7 | 14 GA 1:$w! Xtest1 |
15 $r2:$w! Xtest2 | |
16 $r3:$w! Xtest3 | |
17 :n! Xtest1 Xtest2 | |
18 A 1:set hidden | |
19 :" test for working :n when hidden set; write "testtext 2" | |
20 :n | |
21 :w! test.out | |
22 :" test for failing :rew when hidden not set; write "testtext 2 2" | |
23 :set nohidden | |
24 A 2:rew | |
25 :w >>test.out | |
26 :" test for working :rew when hidden set; write "testtext 1 1" | |
27 :set hidden | |
28 :rew | |
29 :w >>test.out | |
30 :" test for :all keeping a buffer when it's modified; write "testtext 1 1 1" | |
31 :set nohidden | |
32 A 1:sp | |
33 :n Xtest2 Xtest3 | |
34 :all | |
730 | 35 :1wincmd w |
7 | 36 :w >>test.out |
37 :" test abandoning changed buffer, should be unloaded even when 'hidden' set | |
38 :" write "testtext 2 2" twice | |
39 :set hidden | |
40 A 1:q! | |
41 :w >>test.out | |
42 :unhide | |
43 :w >>test.out | |
44 :" test ":hide" hides anyway when 'hidden' not set; write "testtext 3" | |
45 :set nohidden | |
46 A 2:hide | |
47 :w >>test.out | |
48 :" test ":edit" failing in modified buffer when 'hidden' not set | |
49 :" write "testtext 3 3" | |
50 A 3:e Xtest1 | |
51 :w >>test.out | |
52 :" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1" | |
53 :set hidden | |
54 :e Xtest1 | |
55 :w >>test.out | |
56 :" test ":close" not hiding when 'hidden' not set in modified buffer; | |
57 :" write "testtext 3 3 3" | |
58 :sp Xtest3 | |
59 :set nohidden | |
60 A 3:close | |
61 :w >>test.out | |
62 :" test ":close!" does hide when 'hidden' not set in modified buffer; | |
63 :" write "testtext 1" | |
64 A 3:close! | |
65 :w >>test.out | |
3354 | 66 :set nohidden |
67 :" test ":all!" hides changed buffer; write "testtext 2 2 2" | |
68 :sp Xtest4 | |
69 GA 4:all! | |
70 :1wincmd w | |
71 :w >>test.out | |
7469
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
72 :" |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
73 :" test ":q!" and hidden buffer. |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
74 :bw! Xtest1 Xtest2 Xtest3 Xtest4 |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
75 :sp Xtest1 |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
76 :wincmd w |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
77 :bw! |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
78 :set modified |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
79 :bot sp Xtest2 |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
80 :set modified |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
81 :bot sp Xtest3 |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
82 :set modified |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
83 :wincmd t |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
84 :hide |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
85 :q! |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
86 :w >>test.out |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
87 :q! |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
88 :w >>test.out |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
89 :q! |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
90 :call append(line('$'), "Oh, Not finished yet.") |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
91 :w >>test.out |
7 | 92 :qa! |
93 ENDTEST | |
94 | |
95 testtext |