Fix invalid buffer id

This commit is contained in:
hedy
2023-11-02 20:15:29 +08:00
parent 23b31c64e8
commit b495ccc3ef
2 changed files with 3 additions and 4 deletions

View File

@@ -125,7 +125,7 @@ Key:
- ✅ Fix some options
(#180 by cljoly)
- fix: Invalid buffer id error
- fix: Invalid buffer id error
(#177 by snowair)
- ✅ fix(code_actions): use the builtin code_action

View File

@@ -5,9 +5,8 @@ local ui = require 'symbols-outline.ui'
local M = {}
local function is_buffer_outline(bufnr)
local isValid = vim.api.nvim_buf_is_valid(bufnr)
if not isValid then
return
if not vim.api.nvim_buf_is_valid(bufnr) then
return false
end
local name = vim.api.nvim_buf_get_name(bufnr)
local ft = vim.api.nvim_buf_get_option(bufnr, 'filetype')