refactor: add vim._resolve_bufnr

This commit is contained in:
Lewis Russell
2024-12-07 13:05:05 +00:00
committed by Lewis Russell
parent b52ffd0a59
commit 668d2569b4
13 changed files with 61 additions and 121 deletions

View File

@@ -53,7 +53,7 @@ function vim.inspect_pos(bufnr, row, col, filter)
local cursor = vim.api.nvim_win_get_cursor(win)
row, col = cursor[1] - 1, cursor[2]
end
bufnr = bufnr == 0 and vim.api.nvim_get_current_buf() or bufnr
bufnr = vim._resolve_bufnr(bufnr)
local results = {
treesitter = {}, --- @type table[]