aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/ui.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-02-09 22:04:33 +0100
committerJustin M. Keyes <justinkz@gmail.com>2025-02-10 18:56:11 +0100
commit4b0e2605eaf90268195029a29f10903dc82729e7 (patch)
tree76f735084431f5027cdfc90da43370af0f2d2477 /src/nvim/api/ui.c
parentad60b3fb4806c0917010bbe97876c22fb57cabcd (diff)
downloadrneovim-4b0e2605eaf90268195029a29f10903dc82729e7.tar.gz
rneovim-4b0e2605eaf90268195029a29f10903dc82729e7.tar.bz2
rneovim-4b0e2605eaf90268195029a29f10903dc82729e7.zip
feat(ui): UI :detach command
Problem: Cannot detach the current UI. Solution: - Introduce `:detach`. - Introduce `Channel.detach`. Co-authored-by: bfredl <bjorn.linse@gmail.com>
Diffstat (limited to 'src/nvim/api/ui.c')
-rw-r--r--src/nvim/api/ui.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c
index f6f32a73ed..41a09999d0 100644
--- a/src/nvim/api/ui.c
+++ b/src/nvim/api/ui.c
@@ -189,6 +189,7 @@ void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height, Dict opt
ui->wildmenu_active = false;
pmap_put(uint64_t)(&connected_uis, channel_id, ui);
+ current_ui = channel_id;
ui_attach_impl(ui, channel_id);
may_trigger_vim_suspend_resume(false);
@@ -214,6 +215,7 @@ void nvim_ui_set_focus(uint64_t channel_id, Boolean gained, Error *error)
}
if (gained) {
+ current_ui = channel_id;
may_trigger_vim_suspend_resume(false);
}