feat(lua)!: register_keystroke_callback => on_key

Analogous to nodejs's `on('data', …)` interface, here on_key is the "add
listener" interface.

ref 3ccdbc570d #12536

BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
This commit is contained in:
Justin M. Keyes
2021-08-22 18:26:35 -07:00
parent 4eb1ebbcf7
commit 69fe427df4
9 changed files with 91 additions and 105 deletions

View File

@@ -1563,8 +1563,8 @@ int vgetc(void)
*/
may_garbage_collect = false;
// Exec lua callbacks for on_keystroke
nlua_execute_log_keystroke(c);
// Execute Lua on_key callbacks.
nlua_execute_on_key(c);
return c;
}