eventloop: FocusGained: schedule event instead of pseudokey

closes #4840
closes #6164
This commit is contained in:
Justin M. Keyes
2017-08-28 01:27:57 +02:00
parent ce852bab04
commit b6b6e4a96f
10 changed files with 66 additions and 54 deletions

View File

@@ -974,14 +974,6 @@ static int insert_handle_key(InsertState *s)
multiqueue_process_events(main_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:
@@ -3167,8 +3159,7 @@ static bool ins_compl_prep(int c)
/* Ignore end of Select mode mapping and mouse scroll buttons. */
if (c == K_SELECT || c == K_MOUSEDOWN || c == K_MOUSEUP
|| c == K_MOUSELEFT || c == K_MOUSERIGHT || c == K_EVENT
|| c == K_FOCUSGAINED || c == K_FOCUSLOST) {
|| c == K_MOUSELEFT || c == K_MOUSERIGHT || c == K_EVENT) {
return retval;
}