From 0001a83bb7f7b30840df2f2ec321e2c2d9507053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 12 Jun 2017 18:43:03 +0200 Subject: view: rename view_cursors --- sam.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sam.c') diff --git a/sam.c b/sam.c index 0becb66..42a81df 100644 --- a/sam.c +++ b/sam.c @@ -1236,9 +1236,9 @@ enum SamError sam_cmd(Vis *vis, const char *s) { if (vis->win) { if (primary_pos != EPOS && view_selection_disposed(vis->win->view)) view_cursor_to(vis->win->view, primary_pos); - view_selections_primary_set(view_cursors(vis->win->view)); + view_selections_primary_set(view_selections(vis->win->view)); bool completed = true; - for (Cursor *c = view_cursors(vis->win->view); c; c = view_selections_next(c)) { + for (Cursor *c = view_selections(vis->win->view); c; c = view_selections_next(c)) { if (view_selections_anchored(c)) { completed = false; break; @@ -1443,7 +1443,7 @@ static bool cmd_select(Vis *vis, Win *win, Command *cmd, const char *argv[], Cur if (vis->mode->visual) count_init(cmd->cmd, view_selections_count(view)+1); - for (Cursor *c = view_cursors(view), *next; c && ret; c = next) { + for (Cursor *c = view_selections(view), *next; c && ret; c = next) { next = view_selections_next(c); size_t pos = view_cursors_pos(c); if (vis->mode->visual) { @@ -1486,7 +1486,7 @@ static bool cmd_select(Vis *vis, Win *win, Command *cmd, const char *argv[], Cur } if (vis->win && vis->win->view == view && primary != view_selections_primary_get(view)) - view_selections_primary_set(view_cursors(view)); + view_selections_primary_set(view_selections(view)); return ret; } @@ -1562,7 +1562,7 @@ static bool cmd_write(Vis *vis, Win *win, Command *cmd, const char *argv[], Curs bool visual = vis->mode->visual; - for (Cursor *c = view_cursors(win->view); c; c = view_selections_next(c)) { + for (Cursor *c = view_selections(win->view); c; c = view_selections_next(c)) { Filerange range = visual ? view_selections_get(c) : *r; ssize_t written = text_write_range(text, &range, file->fd); if (written == -1 || (size_t)written != text_range_size(&range)) { @@ -1614,7 +1614,7 @@ static bool cmd_write(Vis *vis, Win *win, Command *cmd, const char *argv[], Curs bool failure = false; bool visual = vis->mode->visual; - for (Cursor *c = view_cursors(win->view); c; c = view_selections_next(c)) { + for (Cursor *c = view_selections(win->view); c; c = view_selections_next(c)) { Filerange range = visual ? view_selections_get(c) : *r; ssize_t written = text_save_write_range(ctx, &range); failure = (written == -1 || (size_t)written != text_range_size(&range)); -- cgit v1.2.3