fix(builtin.colorscheme): also restore &background (#1835)
This commit is contained in:
@@ -820,6 +820,7 @@ internal.buffers = function(opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
internal.colorscheme = function(opts)
|
internal.colorscheme = function(opts)
|
||||||
|
local before_background = vim.o.background
|
||||||
local before_color = vim.api.nvim_exec("colorscheme", true)
|
local before_color = vim.api.nvim_exec("colorscheme", true)
|
||||||
local need_restore = true
|
local need_restore = true
|
||||||
|
|
||||||
@@ -910,6 +911,7 @@ internal.colorscheme = function(opts)
|
|||||||
picker.close_windows = function(status)
|
picker.close_windows = function(status)
|
||||||
close_windows(status)
|
close_windows(status)
|
||||||
if need_restore then
|
if need_restore then
|
||||||
|
vim.o.background = before_background
|
||||||
vim.cmd("colorscheme " .. before_color)
|
vim.cmd("colorscheme " .. before_color)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user