fix: use nvim-api to avoid win_getid exceptions (#525)

This commit is contained in:
kylo252 2022-01-04 02:22:52 +01:00 committed by GitHub
parent b18b7ee8ac
commit 4b68b8dd2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ end
function M.show_notices()
vim.cmd('silent! keepalt split')
local winid = vim.fn.win_getid()
local winid = vim.api.nvim_get_current_win()
local bufnr = vim.api.nvim_create_buf(false, true)
vim.api.nvim_win_set_buf(winid, bufnr)

View File

@ -90,7 +90,7 @@ end
-- Check if statusline is on focused window or not
function M.is_focused()
return tonumber(vim.g.actual_curwin) == vim.fn.win_getid()
return tonumber(vim.g.actual_curwin) == vim.api.nvim_get_current_win()
end
--- Check what's the charecter at pos