diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-11-18 19:45:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 19:45:40 +0100 |
commit | 569e5c86bfd7e7729229030fc2045c624e5f33c4 (patch) | |
tree | ade072bafae35d14e7c1223bbdeebcec5057c46d /src/nvim/testdir | |
parent | 790fd58714a98e7910a4a0a56f85fb568f35d52c (diff) | |
parent | 147917369ed8d372feaa9181acd249277636da26 (diff) | |
download | rneovim-569e5c86bfd7e7729229030fc2045c624e5f33c4.tar.gz rneovim-569e5c86bfd7e7729229030fc2045c624e5f33c4.tar.bz2 rneovim-569e5c86bfd7e7729229030fc2045c624e5f33c4.zip |
Merge pull request #13316 from bfredl/vim-8.2.2005
vim-patch:8.2.2005: redoing a mapping with <Cmd> doesn't work properly
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_mapping.vim | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim index 152afb4b9d..c4807797ff 100644 --- a/src/nvim/testdir/test_mapping.vim +++ b/src/nvim/testdir/test_mapping.vim @@ -499,4 +499,40 @@ func Test_mapcomplete() call assert_match("abbr! \x01", @:) endfunc +func Test_map_cmdkey_redo() + func SelectDash() + call search('^---\n\zs', 'bcW') + norm! V + call search('\n\ze---$', 'W') + endfunc + + let text =<< trim END + --- + aaa + --- + bbb + bbb + --- + ccc + ccc + ccc + --- + END + new Xcmdtext + call setline(1, text) + + onoremap <silent> i- <Cmd>call SelectDash()<CR> + call feedkeys('2Gdi-', 'xt') + call assert_equal(['---', '---'], getline(1, 2)) + call feedkeys('j.', 'xt') + call assert_equal(['---', '---', '---'], getline(1, 3)) + call feedkeys('j.', 'xt') + call assert_equal(['---', '---', '---', '---'], getline(1, 4)) + + bwipe! + call delete('Xcmdtext') + delfunc SelectDash + ounmap i- +endfunc + " vim: shiftwidth=2 sts=2 expandtab |