Skip to content

Commit

Permalink
fix(outline-window): no resize if split_command like "30vsplit"
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengpd committed Apr 15, 2024
1 parent bdfd2da commit 3e42493
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/outline/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3e42493

Please sign in to comment.