mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
fix: catch all splitkeep access errors
This commit is contained in:
parent
3eafbd28ae
commit
4c3ff7554d
1 changed files with 3 additions and 1 deletions
|
@ -230,7 +230,9 @@ M.select = function(opts)
|
|||
if config.highlight_on_jump then
|
||||
util.flash_highlight(bufnr, lnum, config.highlight_on_jump)
|
||||
end
|
||||
if vim.fn.exists("&splitkeep") == 1 and vim.o.splitkeep ~= "cursor" then
|
||||
-- This option is only in nightly right now
|
||||
local has_splitkeep, splitkeep = pcall(vim.api.nvim_get_option_value, "splitkeep")
|
||||
if has_splitkeep and splitkeep ~= "cursor" then
|
||||
vim.api.nvim_win_set_cursor(winid, { lnum, col })
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue