cleanup: remove unnecessary option restore_win_options

This was only necessary to begin with because I was using `vim.wo` to
set window options. I mistakenly thought that would set the option as
window-local, but it did not. This was fixed in
6f8bf067c0. Now all the window options
should function as expected without the extra logic.
This commit is contained in:
Steven Arcangeli 2023-09-12 10:52:58 -07:00
parent 308fe70d6c
commit 9e036c6a48
5 changed files with 6 additions and 35 deletions

View file

@ -719,7 +719,6 @@ M.save = function(opts)
end
local function restore_alt_buf()
local config = require("oil.config")
if vim.bo.filetype == "oil" then
require("oil.view").set_win_options()
vim.api.nvim_win_set_var(0, "oil_did_enter", true)
@ -742,10 +741,6 @@ local function restore_alt_buf()
end
end
end
if config.restore_win_options then
require("oil.view").restore_win_options()
end
end
end