Mercurial > vim
view src/testdir/test_langmap.vim @ 15000:32787e326de2 v8.1.0511
patch 8.1.0511: ml_get error when calling a function with a range
commit https://github.com/vim/vim/commit/9e353b5265bd7fa103caf4e5a9b3c99f344f548e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 4 23:39:38 2018 +0100
patch 8.1.0511: ml_get error when calling a function with a range
Problem: ml_get error when calling a function with a range.
Solution: Don't position the cursor after the last line.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Nov 2018 23:45:07 +0100 |
parents | 1a595b2a4d5e |
children | f38fcbf343ce |
line wrap: on
line source
" tests for 'langmap' if !has('langmap') finish endif func Test_langmap() new set langmap=}l,^x,%v call setline(1, ['abc']) call feedkeys('gg0}^', 'tx') call assert_equal('ac', getline(1)) " in Replace mode " need silent! to avoid a delay when entering Insert mode call setline(1, ['abcde']) silent! call feedkeys("gg0lR%{z\<Esc>00", 'tx') call assert_equal('a%{ze', getline(1)) " in Select mode " need silent! to avoid a delay when entering Insert mode call setline(1, ['abcde']) silent! call feedkeys("gg0}%}\<C-G>}^\<Esc>00", 'tx') call assert_equal('a}^de', getline(1)) quit! endfunc