diff options
author | Cédric Barreteau <> | 2020-07-19 17:36:04 +0200 |
---|---|---|
committer | Cédric Barreteau <> | 2020-07-20 20:16:46 +0200 |
commit | fd6361278b79bb3ce9462dcedd0689ad9accd66c (patch) | |
tree | c10b2d1749d24d73693539da4e83c9526fcaa572 /runtime/lua/vim/lsp/util.lua | |
parent | 8bb2c3087a228de0aa95a6d19ae61d93ffe70f62 (diff) | |
download | rneovim-fd6361278b79bb3ce9462dcedd0689ad9accd66c.tar.gz rneovim-fd6361278b79bb3ce9462dcedd0689ad9accd66c.tar.bz2 rneovim-fd6361278b79bb3ce9462dcedd0689ad9accd66c.zip |
Make the window `nomodifiable` when it's created
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index cf084dc060..5a68138f1e 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -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 @@ -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. |