aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-04 16:46:38 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-05-04 17:40:29 +0800
commitb441dafdf53e367c7d43177274bd781c5c73e6e0 (patch)
tree4c8838192ce80a1ed652dd5bbda3c265678cdbea /test
parent62351ff3d2fba336f09569d844a7b6f7f36a078d (diff)
downloadrneovim-b441dafdf53e367c7d43177274bd781c5c73e6e0.tar.gz
rneovim-b441dafdf53e367c7d43177274bd781c5c73e6e0.tar.bz2
rneovim-b441dafdf53e367c7d43177274bd781c5c73e6e0.zip
vim-patch:8.2.2344: using inclusive index for slice is not always desired
Problem: Using inclusive index for slice is not always desired. Solution: Add the slice() method, which has an exclusive index. (closes vim/vim#7408) https://github.com/vim/vim/commit/6601b62943a19d4f8818c3638440663d67a17b6a Cherry-pick a line in docs added later. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_visual.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/old/testdir/test_visual.vim b/test/old/testdir/test_visual.vim
index d10a946200..04282416bb 100644
--- a/test/old/testdir/test_visual.vim
+++ b/test/old/testdir/test_visual.vim
@@ -935,7 +935,7 @@ func Test_visual_block_mode()
endfunc
func Test_visual_force_motion_feedkeys()
- onoremap <expr> i- execute('let g:mode = mode(1)')
+ onoremap <expr> i- execute('let g:mode = mode(1)')->slice(0, 0)
call feedkeys('dvi-', 'x')
call assert_equal('nov', g:mode)
call feedkeys('di-', 'x')