mirror of
https://github.com/neovide/neovide.git
synced 2026-09-10 07:16:25 -04:00
Send options on startup as well as on changed except for columns and rows (#2315)
* Send options on startup as well as on changed except for columns and rows * Don't check all options when observing changes and only add an autocmd for startup once
This commit is contained in:
parent
4e7ee7d1e2
commit
2b00f9eb5c
14
lua/init.lua
14
lua/init.lua
|
|
@ -88,6 +88,20 @@ for _,option_setting in ipairs(args.option_settings) do
|
|||
})
|
||||
end
|
||||
|
||||
-- Ignore initial values of lines and columns because they are set by neovim directly.
|
||||
-- See https://github.com/neovide/neovide/issues/2300
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||
once = true,
|
||||
nested = true,
|
||||
callback = function()
|
||||
for _,option_setting in ipairs(args.option_settings) do
|
||||
if option_setting ~= "lines" and option_setting ~= "columns" then
|
||||
rpcnotify("option_changed", option_setting, vim.o[option_setting])
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- Create auto command for retrieving exit code from neovim on quit.
|
||||
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
|
||||
pattern = "*",
|
||||
|
|
|
|||
Loading…
Reference in a new issue