Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

fix: Invalid buffer id error #177

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

snowair
Copy link

@snowair snowair commented Sep 30, 2022

fix: Invalid buffer id error

@@ -6,9 +6,12 @@ local M = {}

local function is_buffer_outline(bufnr)
local isValid = vim.api.nvim_buf_is_valid(bufnr)
if not isValid then
return
end
local name = vim.api.nvim_buf_get_name(bufnr)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvim_buf_get_name() need a valid bufnr.

@snowair snowair changed the title Master fix: Invalid buffer id error Sep 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant