diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-03-29 20:46:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 20:46:44 -0400 |
commit | 3f447d928debe9a632ddb170ed276c20de2b1586 (patch) | |
tree | ee247610947f7eec56135a0f7bc91df3e628fae1 /src | |
parent | 3c497e214f48ee1433d759f5a56c028df5186f24 (diff) | |
parent | 756f55959986eaa0de07a46e30512d7031766252 (diff) | |
download | rneovim-3f447d928debe9a632ddb170ed276c20de2b1586.tar.gz rneovim-3f447d928debe9a632ddb170ed276c20de2b1586.tar.bz2 rneovim-3f447d928debe9a632ddb170ed276c20de2b1586.zip |
Merge pull request #14248 from andymass/vim-8.2.2612
[RFC] vim-patch 8.2.{2612,2613}
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_mapping.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim index c4807797ff..0191dbf33e 100644 --- a/src/nvim/testdir/test_mapping.vim +++ b/src/nvim/testdir/test_mapping.vim @@ -427,6 +427,30 @@ func Test_error_in_map_expr() exe buf .. 'bwipe!' endfunc +func Test_expr_map_gets_cursor() + new + call setline(1, ['one', 'some w!rd']) + func StoreColumn() + let g:exprLine = line('.') + let g:exprCol = col('.') + return 'x' + endfunc + nnoremap <expr> x StoreColumn() + 2 + nmap ! f!<Ignore>x + call feedkeys("!", 'xt') + call assert_equal('some wrd', getline(2)) + call assert_equal(2, g:exprLine) + call assert_equal(7, g:exprCol) + + bwipe! + unlet g:exprLine + unlet g:exprCol + delfunc StoreColumn + nunmap x + nunmap ! +endfunc + " Test for mapping errors func Test_map_error() call assert_fails('unmap', 'E474:') |