diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-21 09:02:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-21 09:02:30 +0800 |
commit | f1b415b3abbcccb8b0d2aa1a41a45dd52de1a5ff (patch) | |
tree | 00538aab2ab8fa4c5d4045256b0a504f25a14851 /test | |
parent | c4fb418626187066f213b2cc5cdfe728a40f1fed (diff) | |
download | rneovim-f1b415b3abbcccb8b0d2aa1a41a45dd52de1a5ff.tar.gz rneovim-f1b415b3abbcccb8b0d2aa1a41a45dd52de1a5ff.tar.bz2 rneovim-f1b415b3abbcccb8b0d2aa1a41a45dd52de1a5ff.zip |
vim-patch:9.0.1472: ":drop fname" may change the last used tab page (#23230)
Problem: ":drop fname" may change the last used tab page.
Solution: Restore the last used tab page when :drop has changed it.
(closes vim/vim#12087)
https://github.com/vim/vim/commit/8281a16efc76197f7b0b2a385dffb44fce66d33e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_tabpage.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/old/testdir/test_tabpage.vim b/test/old/testdir/test_tabpage.vim index db23a36dd4..9d1d37b862 100644 --- a/test/old/testdir/test_tabpage.vim +++ b/test/old/testdir/test_tabpage.vim @@ -148,6 +148,22 @@ function Test_tabpage() tabonly! endfunc +func Test_tabpage_drop() + edit f1 + tab split f2 + tab split f3 + normal! gt + call assert_equal(1, tabpagenr()) + + tab drop f3 + call assert_equal(3, tabpagenr()) + call assert_equal(1, tabpagenr('#')) + bwipe! + bwipe! + bwipe! + call assert_equal(1, tabpagenr('$')) +endfunc + " Test autocommands function Test_tabpage_with_autocmd() command -nargs=1 -bar C :call add(s:li, '=== ' . <q-args> . ' ===')|<args> |