mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(win): don't update title is relative win is invalid. Closes #1348
This commit is contained in:
parent
5fa93cb684
commit
a00c323d4b
1 changed files with 6 additions and 0 deletions
|
@ -615,6 +615,12 @@ function M:set_title(title, pos)
|
|||
if not self:valid() then
|
||||
return
|
||||
end
|
||||
-- Don't try to update if the relative window is invalid.
|
||||
-- It will be fixed once a full update is done.
|
||||
local relative_win = vim.api.nvim_win_get_config(self.win).win
|
||||
if relative_win and not vim.api.nvim_win_is_valid(relative_win) then
|
||||
return
|
||||
end
|
||||
vim.api.nvim_win_set_config(self.win, {
|
||||
title = self.opts.title,
|
||||
title_pos = self.opts.title_pos,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue