Skip to content

Commit

Permalink
view: rename view_cursors_prev
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Jun 15, 2017
1 parent 5b1b640 commit 88ae50f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ static const char *cursors_new(Vis *vis, const char *keys, const Arg *arg) {
Cursor *cursor_new = view_selections_new(view, newpos);
if (!cursor_new) {
if (arg->i == -1)
cursor_new = view_cursors_prev(cursor);
cursor_new = view_selections_prev(cursor);
else if (arg->i == +1)
cursor_new = view_cursors_next(cursor);
}
Expand Down Expand Up @@ -1473,7 +1473,7 @@ static const char *cursors_navigate(Vis *vis, const char *keys, const Arg *arg)
if (!c)
c = view_cursors(view);
} else {
c = view_cursors_prev(c);
c = view_selections_prev(c);
if (!c) {
c = view_cursors(view);
for (Cursor *n = c; n; n = view_cursors_next(n))
Expand Down
2 changes: 1 addition & 1 deletion view.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ void view_selections_primary_set(Cursor *c) {
c->view->cursor = c;
}

Cursor *view_cursors_prev(Cursor *c) {
Cursor *view_selections_prev(Cursor *c) {
View *view = c->view;
for (c = c->prev; c; c = c->prev) {
if (c->generation != view->cursor_generation)
Expand Down
2 changes: 1 addition & 1 deletion view.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void view_selections_primary_set(Cursor*);
/** Get first selection. */
Cursor *view_cursors(View*);
/** Get immediate predecessor of selection. */
Cursor *view_cursors_prev(Cursor*);
Cursor *view_selections_prev(Cursor*);
/** Get immediate successor of selection. */
Cursor *view_cursors_next(Cursor*);
/**
Expand Down
2 changes: 1 addition & 1 deletion vis.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ static void window_draw_cursors(Win *win) {
CellStyle style_cursor = win->ui->style_get(win->ui, UI_STYLE_CURSOR);
CellStyle style_cursor_primary = win->ui->style_get(win->ui, UI_STYLE_CURSOR_PRIMARY);
CellStyle style_selection = win->ui->style_get(win->ui, UI_STYLE_SELECTION);
for (Cursor *c = view_cursors_prev(cursor); c; c = view_cursors_prev(c)) {
for (Cursor *c = view_selections_prev(cursor); c; c = view_selections_prev(c)) {
window_draw_selection(win->view, c, &style_selection);
size_t pos = view_cursors_pos(c);
if (pos < viewport.start)
Expand Down

0 comments on commit 88ae50f

Please sign in to comment.