aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-11 16:00:26 +0100
committerGitHub <noreply@github.com>2017-03-11 16:00:26 +0100
commitb2b15e6e137d7be2b01bf2174791f36bd12981bd (patch)
treed2df5a02f28c01648be4bafd4cc4f25af82bc8dd /runtime
parent6493ffac1f80c69b041c8626a9ac2bfcde67b05c (diff)
downloadrneovim-b2b15e6e137d7be2b01bf2174791f36bd12981bd.tar.gz
rneovim-b2b15e6e137d7be2b01bf2174791f36bd12981bd.tar.bz2
rneovim-b2b15e6e137d7be2b01bf2174791f36bd12981bd.zip
win/package: nvim-qt v0.2.6 (#6258)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/plugin/gui_shim.vim8
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')