Mercurial > vim
annotate src/testdir/test75.in @ 9287:af25a1a875db v7.4.1926
commit https://github.com/vim/vim/commit/a890f5e34887bff7616bdb4b9ee0bf98c8d2a8f0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 12 23:03:19 2016 +0200
patch 7.4.1926
Problem: Possible crash with many history items.
Solution: Avoid the index going past the last item.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 12 Jun 2016 23:15:07 +0200 |
parents | dd3dac42cb9b |
children |
rev | line source |
---|---|
5405 | 1 Tests for maparg(). |
5718 | 2 Also test utf8 map with a 0x80 byte. |
2610 | 3 |
4 STARTTEST | |
5 :so small.vim | |
5718 | 6 :so mbyte.vim |
3026 | 7 :set cpo-=< |
5718 | 8 :set encoding=utf8 |
2610 | 9 :" Test maparg() with a string result |
10 :map foo<C-V> is<F4>foo | |
11 :vnoremap <script> <buffer> <expr> <silent> bar isbar | |
12 :call append('$', maparg('foo<C-V>')) | |
13 :call append('$', string(maparg('foo<C-V>', '', 0, 1))) | |
14 :call append('$', string(maparg('bar', '', 0, 1))) | |
5035
1cf89d38aa76
updated for version 7.3.1261
Bram Moolenaar <bram@vim.org>
parents:
3026
diff
changeset
|
15 :map <buffer> <nowait> foo bar |
1cf89d38aa76
updated for version 7.3.1261
Bram Moolenaar <bram@vim.org>
parents:
3026
diff
changeset
|
16 :call append('$', string(maparg('foo', '', 0, 1))) |
2610 | 17 :" |
3026 | 18 :map abc x<char-114>x |
19 :call append('$', maparg('abc')) | |
20 :map abc y<S-char-114>y | |
21 :call append('$', maparg('abc')) | |
22 :" | |
5718 | 23 Go:" |
24 :" Outside of the range, minimum | |
25 :inoremap <Char-0x1040> a | |
6195 | 26 :execute "normal a\u1040\<Esc>" |
5718 | 27 :" Inside of the range, minimum |
28 :inoremap <Char-0x103f> b | |
6195 | 29 :execute "normal a\u103f\<Esc>" |
5718 | 30 :" Inside of the range, maximum |
31 :inoremap <Char-0xf03f> c | |
6195 | 32 :execute "normal a\uf03f\<Esc>" |
5718 | 33 :" Outside of the range, maximum |
34 :inoremap <Char-0xf040> d | |
6195 | 35 :execute "normal a\uf040\<Esc>" |
5718 | 36 :" |
2610 | 37 :/^eof/+1,$w! test.out |
38 :qa! | |
39 ENDTEST | |
40 | |
41 eof |