mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
refactor: add vim._resolve_bufnr
This commit is contained in:
committed by
Lewis Russell
parent
b52ffd0a59
commit
668d2569b4
@ -356,9 +356,7 @@ end
|
||||
---@param bufnr (integer) Buffer handle, or 0 for current
|
||||
---@private
|
||||
function M._enable(bufnr)
|
||||
if bufnr == nil or bufnr == 0 then
|
||||
bufnr = api.nvim_get_current_buf()
|
||||
end
|
||||
bufnr = vim._resolve_bufnr(bufnr)
|
||||
|
||||
if not bufstates[bufnr] then
|
||||
bufstates[bufnr] = { enabled = true }
|
||||
|
Reference in New Issue
Block a user