diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-08-30 08:52:50 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-08-30 08:52:50 +0200 |
| commit | bb7e9122c85d9f486d9be5e62ba3c144662a390b (patch) | |
| tree | 23ac2ca8afa72d268c62f65a237668970b2567d5 /text-objects.c | |
| parent | 7c04ebd1309ea8e9032003a21c1d7594a8a75207 (diff) | |
| download | vis-bb7e9122c85d9f486d9be5e62ba3c144662a390b.tar.gz vis-bb7e9122c85d9f486d9be5e62ba3c144662a390b.tar.xz | |
Add support for backticks to movement and text object
Diffstat (limited to 'text-objects.c')
| -rw-r--r-- | text-objects.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/text-objects.c b/text-objects.c index 7595ac7..1ac0395 100644 --- a/text-objects.c +++ b/text-objects.c @@ -65,6 +65,7 @@ Filerange text_object_bracket(Text *txt, size_t pos, char type) { case '[': case ']': open = '['; close = ']'; break; case '<': case '>': open = '<'; close = '>'; break; case '"': open = '"'; close = '"'; break; + case '`': open = '`'; close = '`'; break; case '\'': open = '\''; close = '\''; break; default: return empty; } @@ -72,7 +73,7 @@ Filerange text_object_bracket(Text *txt, size_t pos, char type) { Filerange r = empty; Iterator it = text_iterator_get(txt, pos); - if (open == close && text_iterator_byte_get(&it, &c) && (c == '"' || c == '\'')) { + if (open == close && text_iterator_byte_get(&it, &c) && (c == '"' || c == '`' || c == '\'')) { size_t match = text_bracket_match(txt, pos); r.start = MIN(pos, match) + 1; r.end = MAX(pos, match); |
