Browse Source

fix(autocmds): resume view on current tab after _auto_resize (#4610)

Antoine Pouille 1 month ago
parent
commit
aa51c20f34
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lua/lvim/core/autocmds.lua

+ 5 - 1
lua/lvim/core/autocmds.lua

@@ -71,7 +71,11 @@ function M.load_defaults()
       {
       {
         group = "_auto_resize",
         group = "_auto_resize",
         pattern = "*",
         pattern = "*",
-        command = "tabdo wincmd =",
+        command = [[
+          let _auto_resize_current_tab = tabpagenr()
+          tabdo wincmd =
+          execute 'tabnext' _auto_resize_current_tab
+        ]],
       },
       },
     },
     },
     {
     {