From 9e36ee296ebfa8aed74b440b18634d91859a2069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 26 Jul 2020 17:37:29 +0200 Subject: vis: remove ie inner entire text object --- config.def.h | 1 - main.c | 6 ------ man/vis.1 | 3 --- text-objects.c | 13 ------------- text-objects.h | 2 -- vis-text-objects.c | 3 --- vis.h | 1 - 7 files changed, 29 deletions(-) diff --git a/config.def.h b/config.def.h index b851cf6..db3517a 100644 --- a/config.def.h +++ b/config.def.h @@ -118,7 +118,6 @@ static const KeyBinding bindings_textobjects[] = { { "i}", ALIAS("i{") }, { "ib", ALIAS("i(") }, { "iB", ALIAS("i{") }, - { "ie", ACTION(TEXT_OBJECT_ENTIRE_INNER) }, { "il", ACTION(TEXT_OBJECT_LINE_INNER) }, { "ip", ACTION(TEXT_OBJECT_PARAGRAPH) }, { "is", ACTION(TEXT_OBJECT_SENTENCE) }, diff --git a/main.c b/main.c index fb46399..a7d746b 100644 --- a/main.c +++ b/main.c @@ -305,7 +305,6 @@ enum { VIS_ACTION_TEXT_OBJECT_BACKTICK_OUTER, VIS_ACTION_TEXT_OBJECT_BACKTICK_INNER, VIS_ACTION_TEXT_OBJECT_ENTIRE_OUTER, - VIS_ACTION_TEXT_OBJECT_ENTIRE_INNER, VIS_ACTION_TEXT_OBJECT_LINE_OUTER, VIS_ACTION_TEXT_OBJECT_LINE_INNER, VIS_ACTION_TEXT_OBJECT_INDENTATION, @@ -1137,11 +1136,6 @@ static const KeyAction vis_action[] = { VIS_HELP("The whole text content") textobj, { .i = VIS_TEXTOBJECT_OUTER_ENTIRE } }, - [VIS_ACTION_TEXT_OBJECT_ENTIRE_INNER] = { - "vis-textobject-entire-inner", - VIS_HELP("The whole text content, except for leading and trailing empty lines") - textobj, { .i = VIS_TEXTOBJECT_INNER_ENTIRE } - }, [VIS_ACTION_TEXT_OBJECT_LINE_OUTER] = { "vis-textobject-line-outer", VIS_HELP("The whole line") diff --git a/man/vis.1 b/man/vis.1 index 9a10cc0..1d45f68 100644 --- a/man/vis.1 +++ b/man/vis.1 @@ -1029,9 +1029,6 @@ matches the last used search term in backward direction .It Ic ae entire file content . -.It Ic ie -entire file content except for leading and trailing empty lines -. .It Ic al current line . diff --git a/text-objects.c b/text-objects.c index f4fcb4a..b3b9c69 100644 --- a/text-objects.c +++ b/text-objects.c @@ -15,19 +15,6 @@ Filerange text_object_entire(Text *txt, size_t pos) { return text_range_new(0, text_size(txt)); } -Filerange text_object_entire_inner(Text *txt, size_t pos) { - char c; - Filerange r = text_object_entire(txt, pos); - Iterator it = text_iterator_get(txt, r.start); - if (text_iterator_byte_get(&it, &c) && c == '\n') - while (text_iterator_byte_next(&it, &c) && c == '\n'); - r.start = it.pos; - it = text_iterator_get(txt, r.end); - while (text_iterator_char_prev(&it, &c) && c == '\n'); - r.end = it.pos; - return text_range_linewise(txt, &r); -} - static Filerange text_object_customword(Text *txt, size_t pos, int (*isboundary)(int)) { Filerange r; char c, prev = '0', next = '0'; diff --git a/text-objects.h b/text-objects.h index eb5f65f..abab46e 100644 --- a/text-objects.h +++ b/text-objects.h @@ -11,8 +11,6 @@ /* return range covering the entire text */ Filerange text_object_entire(Text*, size_t pos); -/* entire document except leading and trailing empty lines */ -Filerange text_object_entire_inner(Text*, size_t pos); /* word which happens to be at pos without any neighbouring white spaces */ Filerange text_object_word(Text*, size_t pos); /* includes trailing white spaces. if at pos happens to be a white space diff --git a/vis-text-objects.c b/vis-text-objects.c index ab16672..e7603ff 100644 --- a/vis-text-objects.c +++ b/vis-text-objects.c @@ -176,9 +176,6 @@ const TextObject vis_textobjects[] = { [VIS_TEXTOBJECT_OUTER_ENTIRE] = { .txt = text_object_entire, }, - [VIS_TEXTOBJECT_INNER_ENTIRE] = { - .txt = text_object_entire_inner, - }, [VIS_TEXTOBJECT_OUTER_LINE] = { .txt = text_object_line, }, diff --git a/vis.h b/vis.h index 0696194..caa2782 100644 --- a/vis.h +++ b/vis.h @@ -623,7 +623,6 @@ enum VisTextObject { VIS_TEXTOBJECT_OUTER_BACKTICK, VIS_TEXTOBJECT_INNER_BACKTICK, VIS_TEXTOBJECT_OUTER_ENTIRE, - VIS_TEXTOBJECT_INNER_ENTIRE, VIS_TEXTOBJECT_OUTER_LINE, VIS_TEXTOBJECT_INNER_LINE, VIS_TEXTOBJECT_INDENTATION, -- cgit v1.2.3