diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-01-30 19:47:06 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-03 18:48:04 +0100 |
commit | 8816b7c7aded7ef8defca0bc6a78b2f5887faea6 (patch) | |
tree | f125e81fa8433da2f3ebd5af7b0d17d2a540cb67 /src/undo.cpp | |
parent | 1d768b53295d71705fd1618f936240ed5428cb87 (diff) | |
download | sciteco-8816b7c7aded7ef8defca0bc6a78b2f5887faea6.tar.gz |
first draft of commandline-editing commands ({ and } as in VideoTECO)
* simplified traditional commandline editing. no need to extend cmdline string one character
at a time when inserting multiple. instead there's a marker (cmdline_pos) specifying the macro
length to execute in a "step" and also the anchor for generating undo tokens
* implementation does not yet work in macro calls
* while editing the commandline, other buffers/registers may not be edited
(need push-down-list and auxiliary q-register)
Diffstat (limited to 'src/undo.cpp')
-rw-r--r-- | src/undo.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/undo.cpp b/src/undo.cpp index 82f1eda..1ee7cb4 100644 --- a/src/undo.cpp +++ b/src/undo.cpp @@ -20,7 +20,6 @@ #endif #include <stdio.h> -#include <string.h> #include <bsd/sys/queue.h> #include <glib.h> @@ -50,7 +49,7 @@ UndoStack::push(UndoToken *token) #ifdef DEBUG g_printf("UNDO PUSH %p\n", token); #endif - token->pos = strlen(cmdline); + token->pos = cmdline_pos; SLIST_INSERT_HEAD(&head, token, tokens); } else { delete token; |