From 88ae50f75f8606269269bbf3d8239893befdb0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 12 Jun 2017 18:26:09 +0200 Subject: view: rename view_cursors_prev --- main.c | 4 ++-- view.c | 2 +- view.h | 2 +- vis.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 72a3df3..ace4d09 100644 --- a/main.c +++ b/main.c @@ -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); } @@ -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)) diff --git a/view.c b/view.c index 0f5a599..3b20123 100644 --- a/view.c +++ b/view.c @@ -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) diff --git a/view.h b/view.h index ee12574..0d3c7bd 100644 --- a/view.h +++ b/view.h @@ -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*); /** diff --git a/vis.c b/vis.c index 665b3b9..a0a877f 100644 --- a/vis.c +++ b/vis.c @@ -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) -- cgit v1.2.3