aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index abd16e57ae..08b587df8a 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -3,7 +3,7 @@
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
- * See README.txt for an overview of the Vim source code.
+ * See README.md for an overview of the Vim source code.
*/
/*
@@ -11,7 +11,6 @@
*/
#include <assert.h>
-#include <errno.h>
#include <string.h>
#include <inttypes.h>
#include <stdbool.h>
@@ -977,6 +976,14 @@ static int insert_handle_key(InsertState *s)
queue_process_events(loop.events);
break;
+ case K_FOCUSGAINED: // Neovim has been given focus
+ apply_autocmds(EVENT_FOCUSGAINED, NULL, NULL, false, curbuf);
+ break;
+
+ case K_FOCUSLOST: // Neovim has lost focus
+ apply_autocmds(EVENT_FOCUSLOST, NULL, NULL, false, curbuf);
+ break;
+
case K_HOME: // <Home>
case K_KHOME:
case K_S_HOME: