Mercurial > vim
annotate src/testdir/test91.in @ 11193:75ccc8a15a51 v8.0.0483
patch 8.0.0483: illegal memory access when using :all
commit https://github.com/vim/vim/commit/f79225ed4f81bc579bb3360ad2eb06adc8058153
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 18 23:11:04 2017 +0100
patch 8.0.0483: illegal memory access when using :all
Problem: Illegal memory access when using :all. (Dominique Pelle)
Solution: Adjust the cursor position right after setting "curwin".
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 18 Mar 2017 23:15:04 +0100 |
parents | 5780bd3a5a7e |
children |
rev | line source |
---|---|
10889
5780bd3a5a7e
patch 8.0.0334: can't access b:changedtick from a dict reference
Christian Brabandt <cb@256bit.org>
parents:
7042
diff
changeset
|
1 Tests for getwinvar(), gettabvar() and gettabwinvar(). |
4157 | 2 vim: set ft=vim : |
3 | |
4 STARTTEST | |
5 :so small.vim | |
5231
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
6 :so mbyte.vim |
4157 | 7 :" |
7042
e8eccb9621f7
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Christian Brabandt <cb@256bit.org>
parents:
6197
diff
changeset
|
8 :" Use strings to test for memory leaks. |
e8eccb9621f7
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Christian Brabandt <cb@256bit.org>
parents:
6197
diff
changeset
|
9 :" First, check that in an empty window, gettabvar() returns the correct value |
e8eccb9621f7
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Christian Brabandt <cb@256bit.org>
parents:
6197
diff
changeset
|
10 :let t:testvar='abcd' |
e8eccb9621f7
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Christian Brabandt <cb@256bit.org>
parents:
6197
diff
changeset
|
11 :$put =string(gettabvar(1,'testvar')) |
e8eccb9621f7
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Christian Brabandt <cb@256bit.org>
parents:
6197
diff
changeset
|
12 :$put =string(gettabvar(1,'testvar')) |
4157 | 13 :" |
14 :" test for getwinvar() | |
15 :let w:var_str = "Dance" | |
16 :let def_str = "Chance" | |
17 :$put =string(getwinvar(1, 'var_str')) | |
18 :$put =string(getwinvar(1, 'var_str', def_str)) | |
19 :$put =string(getwinvar(1, '')) | |
20 :$put =string(getwinvar(1, '', def_str)) | |
21 :unlet w:var_str | |
22 :$put =string(getwinvar(1, 'var_str', def_str)) | |
23 :$put =string(getwinvar(1, '')) | |
24 :$put =string(getwinvar(1, '', def_str)) | |
25 :$put =string(getwinvar(9, '')) | |
26 :$put =string(getwinvar(9, '', def_str)) | |
27 :$put =string(getwinvar(1, '&nu')) | |
28 :$put =string(getwinvar(1, '&nu', 1)) | |
29 :unlet def_str | |
30 :" | |
31 :" test for gettabvar() | |
32 :tabnew | |
33 :tabnew | |
34 :let t:var_list = [1, 2, 3] | |
6197 | 35 :let t:other = 777 |
4157 | 36 :let def_list = [4, 5, 6, 7] |
37 :tabrewind | |
38 :$put =string(gettabvar(3, 'var_list')) | |
39 :$put =string(gettabvar(3, 'var_list', def_list)) | |
40 :$put =string(gettabvar(3, '')) | |
41 :$put =string(gettabvar(3, '', def_list)) | |
42 :tablast | |
43 :unlet t:var_list | |
44 :tabrewind | |
45 :$put =string(gettabvar(3, 'var_list', def_list)) | |
46 :$put =string(gettabvar(9, '')) | |
47 :$put =string(gettabvar(9, '', def_list)) | |
48 :$put =string(gettabvar(3, '&nu')) | |
49 :$put =string(gettabvar(3, '&nu', def_list)) | |
50 :unlet def_list | |
51 :tabonly | |
52 :" | |
53 :" test for gettabwinvar() | |
54 :tabnew | |
55 :tabnew | |
56 :tabprev | |
57 :split | |
58 :split | |
59 :wincmd w | |
60 :vert split | |
61 :wincmd w | |
62 :let w:var_dict = {'dict': 'tabwin'} | |
63 :let def_dict = {'dict2': 'newval'} | |
64 :wincmd b | |
65 :tabrewind | |
66 :$put =string(gettabwinvar(2, 3, 'var_dict')) | |
67 :$put =string(gettabwinvar(2, 3, 'var_dict', def_dict)) | |
68 :$put =string(gettabwinvar(2, 3, '')) | |
69 :$put =string(gettabwinvar(2, 3, '', def_dict)) | |
70 :tabnext | |
71 :3wincmd w | |
72 :unlet w:var_dict | |
73 :tabrewind | |
74 :$put =string(gettabwinvar(2, 3, 'var_dict', def_dict)) | |
75 :$put =string(gettabwinvar(2, 3, '')) | |
76 :$put =string(gettabwinvar(2, 3, '', def_dict)) | |
77 :$put =string(gettabwinvar(2, 9, '')) | |
78 :$put =string(gettabwinvar(2, 9, '', def_dict)) | |
79 :$put =string(gettabwinvar(9, 3, '')) | |
80 :$put =string(gettabwinvar(9, 3, '', def_dict)) | |
81 :unlet def_dict | |
82 :$put =string(gettabwinvar(2, 3, '&nux')) | |
83 :$put =string(gettabwinvar(2, 3, '&nux', 1)) | |
84 :tabonly | |
85 :" | |
86 :/^start/,$wq! test.out | |
87 ENDTEST | |
88 | |
89 start: |