refactor: drop nvim-0.9 version checks in float title logic

This commit is contained in:
Barrett Ruth 2026-03-06 16:26:15 -05:00
parent a6ed68ee81
commit c88c6faf6e
Signed by: barrett
GPG key ID: A6C96C9349D2FC81

View file

@ -305,11 +305,7 @@ M.open_float = function(dir, opts, cb)
vim.api.nvim_set_option_value(k, v, { scope = 'local', win = winid })
end
if
vim.fn.has('nvim-0.9') == 1
and config.float.border ~= nil
and config.float.border ~= 'none'
then
if config.float.border ~= nil and config.float.border ~= 'none' then
local cur_win_opts = vim.api.nvim_win_get_config(winid)
vim.api.nvim_win_set_config(winid, {
relative = 'editor',
@ -340,7 +336,7 @@ M.open_float = function(dir, opts, cb)
end
end)
if vim.fn.has('nvim-0.9') == 0 or config.float.border == nil or config.float.border == 'none' then
if config.float.border == nil or config.float.border == 'none' then
util.add_title_to_win(winid)
end
end