From ddd0b28faeafae83f8ad97bd78a10bb9b6eed33f Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 12 Aug 2024 01:22:43 +0200 Subject: reset the window focus after showing a message --- init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.lua b/init.lua index de496d7..6a391b6 100644 --- a/init.lua +++ b/init.lua @@ -512,6 +512,8 @@ local function vis_apply_textEdits(win, file, textEdits) end local function lspc_show_message(msg, hdr, syntax) + local current_win = vis.win + if lspc.show_message == 'message' then vis:message((hdr or '') .. msg) @@ -526,6 +528,9 @@ local function lspc_show_message(msg, hdr, syntax) else lspc_err('invalid message configuration "' .. lspc.show_message .. '".') end + + -- reset the focus to the current window + vis.win = current_win end -- apply a WorkspaceEdit received from the language server -- cgit v1.2.3