From 83206fa91345d24881146f1caed88050594797e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 12 Jun 2017 19:40:43 +0200 Subject: vis: rename uses of Cursor to Selection --- vis-modes.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'vis-modes.c') diff --git a/vis-modes.c b/vis-modes.c index c396b4a..6fd05b7 100644 --- a/vis-modes.c +++ b/vis-modes.c @@ -145,8 +145,8 @@ static void vis_mode_normal_enter(Vis *vis, Mode *old) { return; if (vis->autoindent && strcmp(vis->key_prev, "") == 0) { Text *txt = vis->win->file->text; - for (Cursor *c = view_selections(vis->win->view); c; c = view_selections_next(c)) { - size_t pos = view_cursors_pos(c); + for (Selection *s = view_selections(vis->win->view); s; s = view_selections_next(s)) { + size_t pos = view_cursors_pos(s); size_t start = text_line_start(txt, pos); size_t end = text_line_end(txt, pos); if (start == pos && start == end) { @@ -154,7 +154,7 @@ static void vis_mode_normal_enter(Vis *vis, Mode *old) { size_t len = start - begin; if (len) { text_delete(txt, begin, len); - view_cursors_to(c, pos-len); + view_cursors_to(s, pos-len); } } } @@ -185,15 +185,15 @@ static void vis_mode_operator_input(Vis *vis, const char *str, size_t len) { static void vis_mode_visual_enter(Vis *vis, Mode *old) { if (!old->visual) { - for (Cursor *c = view_selections(vis->win->view); c; c = view_selections_next(c)) - view_selections_anchor(c); + for (Selection *s = view_selections(vis->win->view); s; s = view_selections_next(s)) + view_selections_anchor(s); } } static void vis_mode_visual_line_enter(Vis *vis, Mode *old) { if (!old->visual) { - for (Cursor *c = view_selections(vis->win->view); c; c = view_selections_next(c)) - view_selections_anchor(c); + for (Selection *s = view_selections(vis->win->view); s; s = view_selections_next(s)) + view_selections_anchor(s); } if (!vis->action.op) vis_motion(vis, VIS_MOVE_NOP); -- cgit v1.2.3