aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--text-motions.c1
-rw-r--r--text-objects.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/text-motions.c b/text-motions.c
index 090e727..2b9cf8c 100644
--- a/text-motions.c
+++ b/text-motions.c
@@ -243,6 +243,7 @@ size_t text_bracket_match(Text *txt, size_t pos) {
case '<': search = '>'; direction = 1; break;
case '>': search = '<'; direction = -1; break;
case '"':
+ case '`':
case '\'': {
char special[] = " \n)}]>.,";
search = current;
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);