diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2021-11-24 21:45:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 21:45:42 -0700 |
commit | b5b025f6a3ad406929c096f63b5f1e7649d3c818 (patch) | |
tree | aba24b1ca915372a63179c7d3a3c4ad546ab0501 | |
parent | f2722884a88170d62bd2509b94cda759d5312646 (diff) | |
download | rneovim-b5b025f6a3ad406929c096f63b5f1e7649d3c818.tar.gz rneovim-b5b025f6a3ad406929c096f63b5f1e7649d3c818.tar.bz2 rneovim-b5b025f6a3ad406929c096f63b5f1e7649d3c818.zip |
fix(diagnostic): do not focus floats in goto functions (#16433)
Floating windows opened by `goto_next` and `goto_prev` should not be
focused when repeating the `goto_` function. The float can still be
focused by calling `open_float` with `scope = "cursor"`.
-rw-r--r-- | runtime/lua/vim/diagnostic.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua index 74996faf3c..226c440fe7 100644 --- a/runtime/lua/vim/diagnostic.lua +++ b/runtime/lua/vim/diagnostic.lua @@ -506,7 +506,10 @@ local function diagnostic_move_pos(opts, pos) vim.schedule(function() M.open_float( vim.api.nvim_win_get_buf(win_id), - vim.tbl_extend("keep", float_opts, {scope="cursor"}) + vim.tbl_extend("keep", float_opts, { + scope = "cursor", + focusable = false, + }) ) end) end |