diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-02-02 08:05:15 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-02 08:05:15 +0800 |
| commit | fa35d3c33a74123a3a3374566652161d3ad6ee5c (patch) | |
| tree | 7bbd9cffbeb622c31a729d3905ad9aa8ba5e62c9 /src/nvim/testdir/test_visual.vim | |
| parent | 9ce44a750c2a65082962effe6ce4d185b7698d73 (diff) | |
| download | rneovim-fa35d3c33a74123a3a3374566652161d3ad6ee5c.tar.gz rneovim-fa35d3c33a74123a3a3374566652161d3ad6ee5c.tar.bz2 rneovim-fa35d3c33a74123a3a3374566652161d3ad6ee5c.zip | |
vim-patch:9.0.1273: "1v" may select block with wrong size (#22092)
Problem: "1v" may select block with wrong size. (Evgeni Chasnovski)
Solution: Compute "curswant" in the right line. (closes vim/vim#11925)
https://github.com/vim/vim/commit/8f531662e28c37560bf5ac20a059bf00d01ee5a4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir/test_visual.vim')
| -rw-r--r-- | src/nvim/testdir/test_visual.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index 14d62089cf..1e9629c2c4 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -1319,6 +1319,17 @@ func Test_visual_block_with_substitute() endfunc func Test_visual_reselect_with_count() + enew + call setline(1, ['aaaaaa', '✗ bbbb', '✗ bbbb']) + exe "normal! 2Gw\<C-V>jed" + exe "normal! gg0lP" + call assert_equal(['abbbbaaaaa', '✗bbbb ', '✗ '], getline(1, '$')) + + exe "normal! 1vr." + call assert_equal(['a....aaaaa', '✗.... ', '✗ '], getline(1, '$')) + + bwipe! + " this was causing an illegal memory access let lines =<< trim END |