We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c522df commit 3ac437eCopy full SHA for 3ac437e
1 file changed
lua/powershell/lsp.lua
@@ -322,7 +322,10 @@ M.initialize_or_attach = function(buf)
322
local client = vim.lsp.get_client_by_id(client_id)
323
if not client then return end
324
local attached_buffers = iter(pairs(client.attached_buffers)):map(function(buf) return buf end):totable()
325
- if #attached_buffers == 0 then util.all_session_details[root_dir] = nil end
+ if #attached_buffers == 1 and attached_buffers[1] == opts.buf then
326
+ util.all_session_details[root_dir] = nil
327
+ vim.schedule(function() api.nvim_buf_delete(term_buf, { force = true }) end)
328
+ end
329
330
return true
331
end
0 commit comments