From 9a72fab35bb74467601638ebfe61a8641f4006a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 14 Jan 2016 21:24:19 +0100 Subject: vis: s/moves/vis_motions/g --- vis-core.h | 5 +---- vis-motions.c | 4 ++-- vis.c | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/vis-core.h b/vis-core.h index 463b3a4..a1f4797 100644 --- a/vis-core.h +++ b/vis-core.h @@ -164,11 +164,8 @@ struct Vis { /** stuff used by multiple of the vis-* files */ -/* TODO: make part of Vis struct? enable dynamic modes? */ extern Mode vis_modes[VIS_MODE_INVALID]; - -extern Movement moves[VIS_MOVE_INVALID]; - +extern Movement vis_motions[VIS_MOVE_INVALID]; extern Operator vis_operators[VIS_OP_INVALID]; extern TextObject vis_textobjects[VIS_TEXTOBJECT_INVALID]; diff --git a/vis-motions.c b/vis-motions.c index c0f7ab7..2ee6f60 100644 --- a/vis-motions.c +++ b/vis-motions.c @@ -245,7 +245,7 @@ bool vis_motion(Vis *vis, enum VisMotion motion, ...) { break; } - vis->action.movement = &moves[motion]; + vis->action.movement = &vis_motions[motion]; va_end(ap); action_do(vis, &vis->action); return true; @@ -254,7 +254,7 @@ err: return false; } -Movement moves[] = { +Movement vis_motions[] = { [VIS_MOVE_LINE_UP] = { .cur = view_line_up, .type = LINEWISE }, [VIS_MOVE_LINE_DOWN] = { .cur = view_line_down, .type = LINEWISE }, [VIS_MOVE_SCREEN_LINE_UP] = { .cur = view_screenline_up, }, diff --git a/vis.c b/vis.c index 281d4b3..f5e82d3 100644 --- a/vis.c +++ b/vis.c @@ -699,7 +699,7 @@ void action_do(Vis *vis, Action *a) { if (a->op) { /* we do not support visual repeat, still do something resonable */ if (vis->mode->visual && !a->movement && !a->textobj) - a->movement = &moves[VIS_MOVE_NOP]; + a->movement = &vis_motions[VIS_MOVE_NOP]; /* operator implementations must not change the mode, * they might get called multiple times (once for every cursor) -- cgit v1.2.3