瀏覽代碼

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

Antoine Pouille 1 月之前
父節點
當前提交
aa51c20f34
共有 1 個文件被更改,包括 5 次插入1 次删除
  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",
         pattern = "*",
-        command = "tabdo wincmd =",
+        command = [[
+          let _auto_resize_current_tab = tabpagenr()
+          tabdo wincmd =
+          execute 'tabnext' _auto_resize_current_tab
+        ]],
       },
     },
     {