mirror of
https://github.com/neovim/neovim.git
synced 2025-11-22 10:06:33 +00:00
fix(lsp): set_loclist should target current win
Currently, for large number of diagnostics, the delay in populating loclist may be sufficient for a user to switch to another window, resulting in the loclist being populated on the wrong window.
This commit is contained in:
@@ -1599,8 +1599,8 @@ end
|
||||
--- Can be obtained with e.g. |vim.lsp.util.locations_to_items()|.
|
||||
---
|
||||
--@param items (table) list of items
|
||||
function M.set_loclist(items)
|
||||
vim.fn.setloclist(0, {}, ' ', {
|
||||
function M.set_loclist(items, win_id)
|
||||
vim.fn.setloclist(win_id or 0, {}, ' ', {
|
||||
title = 'Language Server';
|
||||
items = items;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user