patch 9.1.0087: Restoring lastused_tabpage too early in do_arg_all()
Problem: Restore lastused_tabpage too early in do_arg_all() function it
will change later in the function.
Solution: Restore lastused_tabpage a bit later, when being done with
tabpages (glepnir)
closes: #13992
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_tabpage.vim b/src/testdir/test_tabpage.vim
index 46aed22..94f6953 100644
--- a/src/testdir/test_tabpage.vim
+++ b/src/testdir/test_tabpage.vim
@@ -156,10 +156,13 @@
tab split f3
normal! gt
call assert_equal(1, tabpagenr())
+ tab drop f4
+ call assert_equal(1, tabpagenr('#'))
tab drop f3
- call assert_equal(3, tabpagenr())
- call assert_equal(1, tabpagenr('#'))
+ call assert_equal(4, tabpagenr())
+ call assert_equal(2, tabpagenr('#'))
+ bwipe!
bwipe!
bwipe!
bwipe!