Skip to content

Commit

Permalink
Update options that are global
Browse files Browse the repository at this point in the history
  • Loading branch information
MisanthropicBit committed Nov 19, 2024
1 parent fac6b27 commit 3191ccc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/move_between_tabs_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe("moving between tabs", function()

it("moves window to the tab to the right and ignores switchbuf option", function()
given(function()
vim.opt_local.switchbuf = "newtab"
vim.go.switchbuf = "newtab"

local win_id = make_layout({
"row",
Expand Down
13 changes: 2 additions & 11 deletions tests/resize_adjust_neighbors_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ describe("resize", function()
},
})

for _, _win_id in ipairs(vim.api.nvim_tabpage_list_wins(0)) do
vim.api.nvim_set_current_win(_win_id)
vim.opt_local.winwidth = 10
end

vim.go.winwidth = 10
vim.api.nvim_set_current_win(win_id)

local _, main_col_before, main_width_before, _ = get_win_pos_and_dimensions(win_id)
Expand Down Expand Up @@ -164,12 +160,7 @@ describe("resize", function()
},
})

for _, _win_id in ipairs(vim.api.nvim_tabpage_list_wins(0)) do
vim.api.nvim_win_call(_win_id, function()
vim.opt_local.winwidth = 10
end)
end

vim.go.winwidth = 10
vim.api.nvim_set_current_win(win_id)

local _, main_col_before, main_width_before, _ = get_win_pos_and_dimensions(win_id)
Expand Down

0 comments on commit 3191ccc

Please sign in to comment.