diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/plugin/gui_shim.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/plugin/gui_shim.vim b/runtime/plugin/gui_shim.vim index 28d82eb1c7..575b826b5e 100644 --- a/runtime/plugin/gui_shim.vim +++ b/runtime/plugin/gui_shim.vim @@ -4,6 +4,14 @@ if !has('win32') || !has('nvim') || exists('g:GuiLoaded') endif let g:GuiLoaded = 1 +" Close the GUI +function! GuiClose() abort + call rpcnotify(0, 'Gui', 'Close') +endfunction + +" Notify the GUI when exiting Neovim +autocmd VimLeave * call GuiClose() + " A replacement for foreground() function! GuiForeground() abort call rpcnotify(0, 'Gui', 'Foreground') |