diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2020-09-20 17:59:56 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-09-20 17:59:56 +0200 |
| commit | 30bf6ebd9fc9e95f457b80c8263e8ee7e87e1ed4 (patch) | |
| tree | be9dc4e6a7b1933e76aa1ba2513fbef524297e2a /vis-prompt.c | |
| parent | 02970c7e7fe39c0f1a75ce888ac25813a4fa2ee0 (diff) | |
| parent | e938326eee9781d340ae3704a742d5e3bad95cb6 (diff) | |
| download | vis-30bf6ebd9fc9e95f457b80c8263e8ee7e87e1ed4.tar.gz vis-30bf6ebd9fc9e95f457b80c8263e8ee7e87e1ed4.tar.xz | |
Merge branch 'emg-add-ignorecase' of https://github.com/deepcube/vis into master
Diffstat (limited to 'vis-prompt.c')
| -rw-r--r-- | vis-prompt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vis-prompt.c b/vis-prompt.c index fd57a04..bb1db39 100644 --- a/vis-prompt.c +++ b/vis-prompt.c @@ -63,7 +63,8 @@ static const char *prompt_enter(Vis *vis, const char *keys, const Arg *arg) { pattern = "^:"; else if (prompt->file == vis->search_file) pattern = "^(/|\\?)"; - if (pattern && regex && text_regex_compile(regex, pattern, REG_EXTENDED|REG_NEWLINE) == 0) { + int cflags = REG_EXTENDED|REG_NEWLINE|(REG_ICASE*vis->ignorecase); + if (pattern && regex && text_regex_compile(regex, pattern, cflags) == 0) { size_t end = text_line_end(txt, pos); size_t prev = text_search_backward(txt, end, regex); if (prev > pos) |
