aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-10-23 22:45:10 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-10-25 22:46:43 +0100
commitce7ed84dcad5b3abd585f172924c17ce04230631 (patch)
tree2e4a4962592268bff1f9c14c7aeabe6bcaca1cbb /vis.c
parentcdd1b1a38b9f4c531d22c791b9c157450fd05a7e (diff)
downloadvis-ce7ed84dcad5b3abd585f172924c17ce04230631.tar.gz
vis-ce7ed84dcad5b3abd585f172924c17ce04230631.tar.xz
vis: introduce vis_keys API
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vis.c b/vis.c
index f58a602..8c8bdcb 100644
--- a/vis.c
+++ b/vis.c
@@ -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, &macro);
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;