From 3191cccd3eed76168046723048a10d9e10501a28 Mon Sep 17 00:00:00 2001 From: MisanthropicBit Date: Tue, 19 Nov 2024 20:23:49 +0100 Subject: [PATCH] Update options that are global --- tests/move_between_tabs_spec.lua | 2 +- tests/resize_adjust_neighbors_spec.lua | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/tests/move_between_tabs_spec.lua b/tests/move_between_tabs_spec.lua index fc081d2..d547d7c 100644 --- a/tests/move_between_tabs_spec.lua +++ b/tests/move_between_tabs_spec.lua @@ -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", diff --git a/tests/resize_adjust_neighbors_spec.lua b/tests/resize_adjust_neighbors_spec.lua index d0313b6..a6bfe48 100644 --- a/tests/resize_adjust_neighbors_spec.lua +++ b/tests/resize_adjust_neighbors_spec.lua @@ -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) @@ -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)