From f9e2b884c15919757651db8b10c033a344a19e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 10 Jul 2017 18:23:47 +0200 Subject: vis: let '^ mark point to top of jump list --- vis.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 375e73a..7596097 100644 --- a/vis.c +++ b/vis.c @@ -243,14 +243,6 @@ void vis_window_status(Win *win, const char *status) { win->ui->status(win->ui, status); } -void window_selection_save(Win *win) { - Vis *vis = win->vis; - View *view = win->view; - Array sel = view_selections_get_all(view); - vis_mark_set(vis, VIS_MARK_SELECTION, &sel); - array_release(&sel); -} - static void window_free(Win *win) { if (!win) return; @@ -265,7 +257,6 @@ static void window_free(Win *win) { for (size_t i = 0; i < LENGTH(win->modes); i++) map_free(win->modes[i].bindings); marklist_release(&win->jumplist); - mark_release(&win->saved_selections); free(win); } @@ -463,7 +454,6 @@ Win *window_new_file(Vis *vis, File *file, enum UiOption options) { return NULL; } marklist_init(&win->jumplist, 32); - mark_init(&win->saved_selections); file->refcount++; view_options_set(win->view, view_options_get(win->view)); view_tabwidth_set(win->view, vis->tabwidth); @@ -832,7 +822,7 @@ void vis_do(Vis *vis) { reg_slot = 0; if (vis->mode->visual && a->op) - window_selection_save(win); + vis_jumplist_save(vis); for (Selection *sel = view_selections(view), *next; sel; sel = next) { if (vis->interrupted) -- cgit v1.2.3