diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-03-05 11:11:18 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-03-05 11:11:18 +0100 |
| commit | 2bfffb448d980b4de5a1fd964299449a8650aa06 (patch) | |
| tree | e18a5fbce0981d83a3017c5f7f31a3ab6d0ce72a /text-objects.c | |
| parent | 2421ed8c4c609e8efcb1927275853a4d29be81eb (diff) | |
| download | vis-2bfffb448d980b4de5a1fd964299449a8650aa06.tar.gz vis-2bfffb448d980b4de5a1fd964299449a8650aa06.tar.xz | |
text-object: remove C implementation of file name text object
This is no longer needed now that the completion logic was
moved to Lua.
Diffstat (limited to 'text-objects.c')
| -rw-r--r-- | text-objects.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/text-objects.c b/text-objects.c index ff35849..fee8235 100644 --- a/text-objects.c +++ b/text-objects.c @@ -255,33 +255,6 @@ Filerange text_object_backtick(Text *txt, size_t pos) { return text_object_bracket(txt, pos, '`'); } -Filerange text_object_range(Text *txt, size_t pos, int (*isboundary)(int)) { - char c; - size_t start; - Iterator it = text_iterator_get(txt, pos), rit = it; - if (!text_iterator_byte_get(&rit, &c) || boundary(c)) - return text_range_empty(); - char tmp = c; - do start = rit.pos; while (text_iterator_char_prev(&rit, &c) && !boundary(c)); - for (c = tmp; !boundary(c) && text_iterator_byte_next(&it, &c);); - return text_range_new(start, it.pos); -} - -static int is_filename_boundary(int c) { - switch (c) { - case ';': case ':': case '|': - case '"': case '\'': case '`': - case '<': case '>': - return true; - default: - return isspace(c); - } -} - -Filerange text_object_filename(Text *txt, size_t pos) { - return text_object_range(txt, pos, is_filename_boundary); -} - Filerange text_object_search_forward(Text *txt, size_t pos, Regex *regex) { size_t start = pos; size_t end = text_size(txt); |
