diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-03-12 14:02:04 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-03-12 14:02:04 +0100 |
| commit | 2bbcf715a18a2a27dc2beb30e3f644273d7e16a9 (patch) | |
| tree | 6b96898dd85e5a21eb085fbd31c97f1cc5d4cdd4 /vis.h | |
| parent | b9f04d851d17d404a842a4d8afe2156aef337283 (diff) | |
| download | vis-2bbcf715a18a2a27dc2beb30e3f644273d7e16a9.tar.gz vis-2bbcf715a18a2a27dc2beb30e3f644273d7e16a9.tar.xz | |
vis: overhaul search related code, support "/ register
Diffstat (limited to 'vis.h')
| -rw-r--r-- | vis.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -11,6 +11,7 @@ typedef struct Win Win; #include "ui.h" #include "view.h" +#include "text-regex.h" typedef struct { void (*vis_start)(Vis*); @@ -351,6 +352,7 @@ enum VisRegister { VIS_REG_PROMPT, /* internal register which shadows DEFAULT in PROMPT mode */ VIS_MACRO_OPERATOR, /* records entered keys after an operator */ VIS_MACRO_REPEAT, /* copy of the above macro once the recording is finished */ + VIS_REG_SEARCH, VIS_REG_INVALID, /* has to be the last 'real' register */ VIS_REG_A, VIS_REG_B, VIS_REG_C, VIS_REG_D, VIS_REG_E, VIS_REG_F, VIS_REG_G, VIS_REG_H, VIS_REG_I, VIS_REG_J, @@ -412,6 +414,9 @@ bool vis_keys_inject(Vis*, const char *pos, const char *input); * was handled by vis */ bool vis_signal_handler(Vis*, int signum, const siginfo_t *siginfo, const void *context); +/* remember last search pattern, freeing the regex is the callers responsibility */ +Regex *vis_regex(Vis*, const char *pattern); + /* TODO: expose proper API to iterate through files etc */ Text *vis_text(Vis*); View *vis_view(Vis*); |
