Merge pull request #14646 from mfussenegger/wipe-floating-markdown-bufs

lsp: Ensure floating markdown buffers are deleted on hide
This commit is contained in:
Michael Lingelbach 2021-05-26 12:13:58 -07:00 committed by GitHub
commit 192f89ea1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1159,6 +1159,7 @@ function M.fancy_floating_markdown(contents, opts)
local winnr = api.nvim_open_win(bufnr, false, M.make_floating_popup_options(width, height, opts))
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, stripped)
api.nvim_buf_set_option(bufnr, 'modifiable', false)
api.nvim_buf_set_option(bufnr, 'bufhidden', 'wipe')
-- Switch to the floating window to apply the syntax highlighting.
-- This is because the syntax command doesn't accept a target.