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"`.
This commit is contained in:
Gregory Anders 2021-11-24 21:45:42 -07:00 committed by GitHub
parent f2722884a8
commit b5b025f6a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -506,7 +506,10 @@ local function diagnostic_move_pos(opts, pos)
vim.schedule(function() vim.schedule(function()
M.open_float( M.open_float(
vim.api.nvim_win_get_buf(win_id), 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)
end end