fix: use nvim-api to avoid win_getid exceptions (#525)
This commit is contained in:
parent
b18b7ee8ac
commit
4b68b8dd2a
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue