aboutsummaryrefslogtreecommitdiff
path: root/text-objects.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-15 08:25:23 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-15 08:27:59 +0100
commit749e6f9a50d5570d40c2c5f1ebc3eaceb32776da (patch)
treea6d6d0dafc4fdb4a8f5bea2e6a9c2ea72263a51d /text-objects.c
parentd266238916882b4082b3ddbb71941aea5e7d20ef (diff)
downloadvis-749e6f9a50d5570d40c2c5f1ebc3eaceb32776da.tar.gz
vis-749e6f9a50d5570d40c2c5f1ebc3eaceb32776da.tar.xz
vis: remove motion and text objects related to C functions
These do not really belong into the editor core. If desired they could be implemented in Lua instead.
Diffstat (limited to 'text-objects.c')
-rw-r--r--text-objects.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/text-objects.c b/text-objects.c
index bbf043d..7aa96ec 100644
--- a/text-objects.c
+++ b/text-objects.c
@@ -176,37 +176,6 @@ Filerange text_object_paragraph(Text *txt, size_t pos) {
return r;
}
-static Filerange object_function(Text *txt, size_t pos) {
- size_t start_prev = text_function_start_prev(txt, pos);
- size_t end_next = text_function_end_next(txt, pos);
- size_t start = text_function_start_next(txt, start_prev);
- size_t end = text_function_end_prev(txt, end_next);
- if (start == pos)
- start_prev = pos;
- if (end == pos)
- end_next = pos;
- if (text_function_end_next(txt, start_prev) == end_next &&
- text_function_start_prev(txt, end_next) == start_prev) {
- return text_range_new(start_prev, end_next);
- }
- return text_range_empty();
-}
-
-Filerange text_object_function(Text *txt, size_t pos) {
- Filerange r = object_function(txt, pos);
- if (!text_range_valid(&r))
- return r;
- r.end++;
- return text_range_linewise(txt, &r);
-}
-
-Filerange text_object_function_inner(Text *txt, size_t pos) {
- Filerange r = object_function(txt, pos);
- if (!text_range_valid(&r))
- return r;
- return text_range_new(text_bracket_match(txt, r.end)+1, r.end);
-}
-
static Filerange text_object_bracket(Text *txt, size_t pos, char type) {
char c, open, close;
int opened = 1, closed = 1;