diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-08 03:23:47 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-09 20:32:24 +0100 |
commit | a475ea8eacfcce8a3f0112f121400e37fffc0934 (patch) | |
tree | 063bff5a8dcc48deadf28cbb939b1e204cb70ecd /src/ring.h | |
parent | 1c3b2a9cf7bc298941f1165885fb1a3c76105878 (diff) | |
download | sciteco-a475ea8eacfcce8a3f0112f121400e37fffc0934.tar.gz |
current_doc_must_undo(): check for undo-necessity when operating on the current document
if the current document is a local q-register from a macro call,
we must not generate undo tokens, since the local documents
are discarded on macro termination.
Diffstat (limited to 'src/ring.h')
-rw-r--r-- | src/ring.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -247,4 +247,11 @@ current_doc_update(void) QRegisters::current->update_string(); } +static inline bool +current_doc_must_undo(void) +{ + return ring.current || + QRegisters::current->must_undo; +} + #endif |