diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-08 02:21:36 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-08 02:21:36 +0100 |
commit | 0d01c262c0ed23ef950530c743b023e89ef4a821 (patch) | |
tree | cffd42ba85f3ef7ecf82193ce3302570507adede /undo.cpp | |
parent | 075d33912ac88aa288055ce2f4eff4273bce3d63 (diff) | |
download | sciteco-0d01c262c0ed23ef950530c743b023e89ef4a821.tar.gz |
support line termination ($$) as immediate editing command + some fixes
* separate function for immediate editing command processing
* undo.clear() to remove and free all undo tokens without executing them
* goto_table_clear() to remove and free all goto table entries
Diffstat (limited to 'undo.cpp')
-rw-r--r-- | undo.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -47,6 +47,17 @@ UndoStack::pop(gint pos) } } +void +UndoStack::clear(void) +{ + UndoToken *cur; + + while ((cur = SLIST_FIRST(&head))) { + SLIST_REMOVE_HEAD(&head, tokens); + delete cur; + } +} + UndoStack::~UndoStack() { UndoToken *token, *next; |