diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-04-21 08:41:13 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-21 10:01:40 +0200 |
| commit | 7b1f313436c09d4e41ba71fa0ad91326c4e16944 (patch) | |
| tree | 3c8e3f30bd2237f337541b3d16c2ef1d22f09914 /sam.c | |
| parent | 59b883431996e4d52d74d8926bc48243ec9dc8be (diff) | |
| download | vis-7b1f313436c09d4e41ba71fa0ad91326c4e16944.tar.gz vis-7b1f313436c09d4e41ba71fa0ad91326c4e16944.tar.xz | |
vis: add infrastructure to register custom :-commands
Diffstat (limited to 'sam.c')
| -rw-r--r-- | sam.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -109,6 +109,7 @@ static bool cmd_help(Vis*, Win*, Command*, const char *argv[], Cursor*, Filerang static bool cmd_map(Vis*, Win*, Command*, const char *argv[], Cursor*, Filerange*); static bool cmd_unmap(Vis*, Win*, Command*, const char *argv[], Cursor*, Filerange*); static bool cmd_langmap(Vis*, Win*, Command*, const char *argv[], Cursor*, Filerange*); +static bool cmd_user(Vis*, Win*, Command*, const char *argv[], Cursor*, Filerange*); /* command recognized at the ':'-prompt. commands are found using a unique * prefix match. that is if a command should be available under an abbreviation @@ -161,7 +162,10 @@ static const CommandDef cmds[] = { }; static const CommandDef cmddef_select = - { { "s" }, 0, NULL, cmd_select }; + { { NULL }, 0, NULL, cmd_select }; + +static const CommandDef cmddef_user = + { { NULL }, CMD_ARGV|CMD_FORCE|CMD_ONCE, NULL, cmd_user }; bool sam_init(Vis *vis) { if (!(vis->cmds = map_new())) |
