Up Next:
-* Undo/Redo tags should apply to the edit buffer, ctrl+z + ctrl+y to the current buffer
* Tag line count should account for wrapped lines
* block selection should handle brace-balancing
* context sensitive selection of words, commands, line numbers, or filenames.
static void save(void);
static void undo(void);
static void redo(void);
+static void tag_undo(void);
+static void tag_redo(void);
static void cut(void);
static void copy(void);
static void paste(void);
{ .tag = "Cut", .action.noarg = cut },
{ .tag = "Copy", .action.noarg = copy },
{ .tag = "Paste", .action.noarg = paste },
- { .tag = "Undo", .action.noarg = undo },
- { .tag = "Redo", .action.noarg = redo },
+ { .tag = "Undo", .action.noarg = tag_undo },
+ { .tag = "Redo", .action.noarg = tag_redo },
{ .tag = "Find", .action.arg = find },
{ .tag = "Tabs", .action.noarg = tabs },
{ .tag = "Indent", .action.noarg = indent },
view_redo(currview());
}
+static void tag_undo(void) {
+ view_undo(getview(EDIT));
+}
+
+static void tag_redo(void) {
+ view_redo(getview(EDIT));
+}
+
static void cut(void) {
char* str = view_getstr(currview(), NULL);
if (str && *str) {