diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-09-14 18:44:47 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-09-14 19:15:35 +0200 |
| commit | 0ba823967ec9a4382ad683316795f50212515e58 (patch) | |
| tree | 1a76f193d7e3a02b7b444ad079d619a50d8d6292 | |
| parent | 2281b3f5f727ae951cf4b68b80ffd88a5f568d4c (diff) | |
| download | vis-lspc-0ba823967ec9a4382ad683316795f50212515e58.tar.gz vis-lspc-0ba823967ec9a4382ad683316795f50212515e58.zip | |
properly close the message window after applying a workspaceEdit
| -rw-r--r-- | init.lua | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -430,6 +430,19 @@ local function vis_apply_textEdits(win, file, textEdits) win:draw() end +--- Close the message window +-- TODO: close the dedicated lspc message window +local function lspc_close_message_win() + if lspc.show_message == 'message' then + vis:message('') + vis:command('q') + else + end +end + +--- Present a message to the user +-- TODO: scroll the message window +-- TODO: use a dedicated lspc message window local function lspc_show_message(msg, hdr, syntax) local current_win = vis.win @@ -485,7 +498,7 @@ local function vis_apply_workspaceEdit(_, _, workspaceEdit) local confirmation = lspc_confirm('apply changes:') -- close summary window - vis:command('q') + lspc_close_message_win() if not confirmation then return |
