Skip to content

Commit

Permalink
vis: s/moves/vis_motions/g
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Jan 14, 2016
1 parent 76ba280 commit 9a72fab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions vis-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
4 changes: 2 additions & 2 deletions vis-motions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -254,7 +254,7 @@ bool vis_motion(Vis *vis, enum VisMotion motion, ...) {
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, },
Expand Down
2 changes: 1 addition & 1 deletion vis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9a72fab

Please sign in to comment.