aboutsummaryrefslogtreecommitdiff
path: root/vis-modes.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis-modes.c')
-rw-r--r--vis-modes.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vis-modes.c b/vis-modes.c
index 41121a8..f6d2b26 100644
--- a/vis-modes.c
+++ b/vis-modes.c
@@ -148,7 +148,7 @@ static void vis_mode_normal_enter(Vis *vis, Mode *old) {
return;
if (vis->autoindent && strcmp(vis->key_prev, "<Enter>") == 0) {
Text *txt = win->file->text;
- for (Selection *s = view_selections(win->view); s; s = view_selections_next(s)) {
+ for (Selection *s = view_selections(&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);
@@ -189,7 +189,7 @@ static void vis_mode_operator_input(Vis *vis, const char *str, size_t len) {
static void vis_mode_visual_enter(Vis *vis, Mode *old) {
Win *win = vis->win;
if (!old->visual && win) {
- for (Selection *s = view_selections(win->view); s; s = view_selections_next(s))
+ for (Selection *s = view_selections(&win->view); s; s = view_selections_next(s))
s->anchored = true;
}
}
@@ -197,7 +197,7 @@ static void vis_mode_visual_enter(Vis *vis, Mode *old) {
static void vis_mode_visual_line_enter(Vis *vis, Mode *old) {
Win *win = vis->win;
if (!old->visual && win) {
- for (Selection *s = view_selections(win->view); s; s = view_selections_next(s))
+ for (Selection *s = view_selections(&win->view); s; s = view_selections_next(s))
s->anchored = true;
}
if (!vis->action.op)
@@ -211,9 +211,9 @@ static void vis_mode_visual_line_leave(Vis *vis, Mode *new) {
if (!new->visual) {
if (!vis->action.op)
window_selection_save(win);
- view_selections_clear_all(win->view);
+ view_selections_clear_all(&win->view);
} else {
- view_cursors_to(win->view->selection, view_cursor_get(win->view));
+ view_cursors_to(win->view.selection, view_cursor_get(&win->view));
}
}
@@ -222,7 +222,7 @@ static void vis_mode_visual_leave(Vis *vis, Mode *new) {
if (!new->visual && win) {
if (!vis->action.op)
window_selection_save(win);
- view_selections_clear_all(win->view);
+ view_selections_clear_all(&win->view);
}
}