Skip to content

Commit

Permalink
Make the window nomodifiable when it's created
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Barreteau committed Jul 20, 2020
1 parent 8bb2c30 commit fd63612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/lua/vim/lsp/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ function M.focusable_float(unique_name, fn)
if win then
api.nvim_set_current_win(win)
api.nvim_command("stopinsert")
api.nvim_buf_set_option(0, 'modifiable', false)
return
end
end
Expand Down Expand Up @@ -736,6 +735,7 @@ function M.fancy_floating_markdown(contents, opts)
local bufnr = api.nvim_create_buf(false, true)
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)

-- Switch to the floating window to apply the syntax highlighting.
-- This is because the syntax command doesn't accept a target.
Expand Down

0 comments on commit fd63612

Please sign in to comment.