aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h2
-rw-r--r--main.c12
-rw-r--r--vis-core.h7
-rw-r--r--vis-motions.c42
4 files changed, 0 insertions, 63 deletions
diff --git a/config.def.h b/config.def.h
index b210ef3..39a3d33 100644
--- a/config.def.h
+++ b/config.def.h
@@ -241,8 +241,6 @@ static const KeyBinding bindings_normal[] = {
{ "<F1>", ALIAS(":help<Enter>") },
{ "ga", ACTION(UNICODE_INFO) },
{ "g8", ACTION(UTF8_INFO) },
- { "g,", ACTION(CHANGELIST_NEXT) },
- { "g;", ACTION(CHANGELIST_PREV) },
{ "g-", ACTION(EARLIER) },
{ "g+", ACTION(LATER) },
{ "gn", ALIAS("vgn") },
diff --git a/main.c b/main.c
index 8db470d..5c5399a 100644
--- a/main.c
+++ b/main.c
@@ -215,8 +215,6 @@ enum {
VIS_ACTION_JUMPLIST_PREV,
VIS_ACTION_JUMPLIST_NEXT,
VIS_ACTION_JUMPLIST_SAVE,
- VIS_ACTION_CHANGELIST_PREV,
- VIS_ACTION_CHANGELIST_NEXT,
VIS_ACTION_UNDO,
VIS_ACTION_REDO,
VIS_ACTION_EARLIER,
@@ -669,16 +667,6 @@ static const KeyAction vis_action[] = {
VIS_HELP("Save current selections in jump list")
jumplist, { .i = 0 }
},
- [VIS_ACTION_CHANGELIST_PREV] = {
- "vis-changelist-prev",
- VIS_HELP("Go to older cursor position in change list")
- movement, { .i = VIS_MOVE_CHANGELIST_PREV }
- },
- [VIS_ACTION_CHANGELIST_NEXT] = {
- "vis-changelist-next",
- VIS_HELP("Go to newer cursor position in change list")
- movement, { .i = VIS_MOVE_CHANGELIST_NEXT }
- },
[VIS_ACTION_UNDO] = {
"vis-undo",
VIS_HELP("Undo last change")
diff --git a/vis-core.h b/vis-core.h
index cb384a4..a4ebac1 100644
--- a/vis-core.h
+++ b/vis-core.h
@@ -153,19 +153,12 @@ struct File { /* shared state among windows displaying the same file */
File *next, *prev;
};
-typedef struct {
- time_t state; /* state of the text, used to invalidate change list */
- size_t index; /* #number of changes */
- size_t pos; /* where the current change occured */
-} ChangeList;
-
struct Win {
Vis *vis; /* editor instance to which this window belongs to */
UiWin *ui; /* ui object handling visual appearance of this window */
File *file; /* file being displayed in this window */
View *view; /* currently displayed part of underlying text */
MarkList jumplist; /* LRU jump management */
- ChangeList changelist; /* state for iterating through least recently changes */
Mode modes[VIS_MODE_INVALID]; /* overlay mods used for per window key bindings */
Win *parent; /* window which was active when showing the command prompt */
Mode *parent_mode; /* mode which was active when showing the command prompt */
diff --git a/vis-motions.c b/vis-motions.c
index 6a668c5..5aa0e87 100644
--- a/vis-motions.c
+++ b/vis-motions.c
@@ -171,40 +171,6 @@ static size_t view_lines_bottom(Vis *vis, View *view) {
return view_screenline_goto(vis->win->view, h - vis_count_get_default(vis, 0));
}
-static size_t window_changelist_next(Vis *vis, Win *win, size_t pos) {
- ChangeList *cl = &win->changelist;
- Text *txt = win->file->text;
- time_t state = text_state(txt);
- if (cl->state != state)
- cl->index = 0;
- else if (cl->index > 0 && pos == cl->pos)
- cl->index--;
- size_t newpos = pos;
- if (newpos == EPOS)
- cl->index++;
- else
- cl->pos = newpos;
- cl->state = state;
- return cl->pos;
-}
-
-static size_t window_changelist_prev(Vis *vis, Win *win, size_t pos) {
- ChangeList *cl = &win->changelist;
- Text *txt = win->file->text;
- time_t state = text_state(txt);
- if (cl->state != state)
- cl->index = 0;
- else if (pos == cl->pos)
- win->changelist.index++;
- size_t newpos = pos;
- if (newpos == EPOS)
- cl->index--;
- else
- cl->pos = newpos;
- cl->state = state;
- return cl->pos;
-}
-
static size_t window_nop(Vis *vis, Win *win, size_t pos) {
return pos;
}
@@ -586,14 +552,6 @@ const Movement vis_motions[] = {
.view = view_lines_bottom,
.type = LINEWISE|JUMP|IDEMPOTENT,
},
- [VIS_MOVE_CHANGELIST_NEXT] = {
- .win = window_changelist_next,
- .type = INCLUSIVE,
- },
- [VIS_MOVE_CHANGELIST_PREV] = {
- .win = window_changelist_prev,
- .type = INCLUSIVE,
- },
[VIS_MOVE_NOP] = {
.win = window_nop,
.type = IDEMPOTENT,