From 3e42493b1752064e4870966c5e214addf4afd421 Mon Sep 17 00:00:00 2001 From: Zheng Piaodan Date: Mon, 15 Apr 2024 14:22:40 +0800 Subject: [PATCH] fix(outline-window): no resize if split_command like "30vsplit" --- lua/outline/view.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/outline/view.lua b/lua/outline/view.lua index 6067e77..7ef9ec4 100644 --- a/lua/outline/view.lua +++ b/lua/outline/view.lua @@ -23,8 +23,11 @@ function View:setup_view(split_command) -- create a split vim.cmd(split_command) - -- resize to a % of the current window size - vim.cmd('vertical resize ' .. cfg.o.outline_window.width) + -- resize if split_command not specify width like "25vsplit" + if split_command:match("%d+") == nil then + -- resize to a % of the current window size + vim.cmd('vertical resize ' .. cfg.o.outline_window.width) + end -- get current (outline) window and attach our buffer to it self.win = vim.api.nvim_get_current_win()