diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-10-23 22:45:10 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-10-25 22:46:43 +0100 |
| commit | ce7ed84dcad5b3abd585f172924c17ce04230631 (patch) | |
| tree | 2e4a4962592268bff1f9c14c7aeabe6bcaca1cbb | |
| parent | cdd1b1a38b9f4c531d22c791b9c157450fd05a7e (diff) | |
| download | vis-ce7ed84dcad5b3abd585f172924c17ce04230631.tar.gz vis-ce7ed84dcad5b3abd585f172924c17ce04230631.tar.xz | |
vis: introduce vis_keys API
| -rw-r--r-- | vis.c | 7 | ||||
| -rw-r--r-- | vis.h | 2 |
2 files changed, 5 insertions, 4 deletions
@@ -360,7 +360,6 @@ static bool vis_window_split(Win *win); static const char *getkey(Vis*); static const char *keynext(Vis*, const char *keys); -static const char *keypress(Vis*, const char *key); static void action_do(Vis*, Action *a); static bool exec_command(Vis *vis, char type, const char *cmdline); @@ -729,7 +728,7 @@ static const char *macro_replay(Vis *vis, const char *keys, const Arg *arg) { Macro *macro; keys = key2macro(vis, keys, ¯o); if (macro && macro != vis->recording) - keypress(vis, macro->data); + vis_keys(vis, macro->data); return keys; } @@ -2453,7 +2452,7 @@ static const char *keynext(Vis *vis, const char *keys) { return termkey_strpkey(termkey, keys, &key, TERMKEY_FORMAT_VIM); } -static const char *keypress(Vis *vis, const char *input) { +const char *vis_keys(Vis *vis, const char *input) { if (!input) return NULL; @@ -2667,7 +2666,7 @@ void vis_run(Vis *vis, int argc, char *argv[]) { const char *key; while ((key = getkey(vis))) - keypress(vis, key); + vis_keys(vis, key); if (vis->mode->idle) timeout = &idle; @@ -139,6 +139,8 @@ void vis_textobject(Vis*, enum VisTextObject); bool vis_cmd(Vis*, const char *cmdline); +const char *vis_keys(Vis*, const char *input); + bool vis_signal_handler(Vis*, int signum, const siginfo_t *siginfo, const void *context); |
