diff options
| -rw-r--r-- | main.c | 6 | ||||
| -rw-r--r-- | text-motions.c | 8 | ||||
| -rw-r--r-- | text-motions.h | 5 | ||||
| -rw-r--r-- | vis-motions.c | 4 |
4 files changed, 2 insertions, 21 deletions
@@ -155,7 +155,6 @@ enum { VIS_ACTION_CURSOR_LINE_FINISH, VIS_ACTION_CURSOR_LINE_BEGIN, VIS_ACTION_CURSOR_LINE_END, - VIS_ACTION_CURSOR_LINE_LASTCHAR, VIS_ACTION_CURSOR_SCREEN_LINE_UP, VIS_ACTION_CURSOR_SCREEN_LINE_DOWN, VIS_ACTION_CURSOR_SCREEN_LINE_BEGIN, @@ -420,11 +419,6 @@ static const KeyAction vis_action[] = { "Move cursor to end of the line", movement, { .i = VIS_MOVE_LINE_END } }, - [VIS_ACTION_CURSOR_LINE_LASTCHAR] = { - "cursor-line-lastchar", - "Move cursor to last character of the line", - movement, { .i = VIS_MOVE_LINE_LASTCHAR } - }, [VIS_ACTION_CURSOR_SCREEN_LINE_UP] = { "cursor-screenline-up", "Move cursor screen/display line upwards", diff --git a/text-motions.c b/text-motions.c index 884d95c..f5701ae 100644 --- a/text-motions.c +++ b/text-motions.c @@ -158,14 +158,6 @@ size_t text_line_finish(Text *txt, size_t pos) { return it.pos; } -size_t text_line_lastchar(Text *txt, size_t pos) { - char c; - Iterator it = text_iterator_get(txt, text_line_end(txt, pos)); - if (text_iterator_char_prev(&it, &c) && c == '\n') - text_iterator_byte_next(&it, NULL); - return it.pos; -} - size_t text_line_end(Text *txt, size_t pos) { char c; Iterator it = text_iterator_get(txt, pos); diff --git a/text-motions.h b/text-motions.h index 6a3c058..a52b778 100644 --- a/text-motions.h +++ b/text-motions.h @@ -28,14 +28,13 @@ size_t text_line_find_prev(Text*, size_t pos, const char *s); /* begin finish end next * v v v v * [\r]\n I am a line! [\r]\n - * ^ ^ ^ - * prev start lastchar + * ^ ^ + * prev start */ size_t text_line_prev(Text*, size_t pos); size_t text_line_begin(Text*, size_t pos); size_t text_line_start(Text*, size_t pos); size_t text_line_finish(Text*, size_t pos); -size_t text_line_lastchar(Text*, size_t pos); size_t text_line_end(Text*, size_t pos); size_t text_line_next(Text*, size_t pos); size_t text_line_offset(Text*, size_t pos, size_t off); diff --git a/vis-motions.c b/vis-motions.c index 82b48f3..02b687d 100644 --- a/vis-motions.c +++ b/vis-motions.c @@ -394,10 +394,6 @@ const Movement vis_motions[] = { .txt = text_line_finish, .type = INCLUSIVE, }, - [VIS_MOVE_LINE_LASTCHAR] = { - .txt = text_line_lastchar, - .type = INCLUSIVE, - }, [VIS_MOVE_LINE_END] = { .txt = text_line_end, }, |
