From d59ba50b600dc5560211ba236772cad1d43e5a05 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 9 Nov 2014 18:23:37 +0100 Subject: fixed undoing of initial TECO document changes * the TECODocument::undo_edit() function is called before TECODocument::edit() and the Scintilla document might still be unitialized * fixes e.g. undoing of Xq, ^Uq on registers whose string part has not being used before --- src/document.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index c01bd4c..dd39a56 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -75,6 +75,9 @@ TECODocument::edit(void) void TECODocument::undo_edit(void) { + if (!is_initialized()) + doc = (SciDoc)interface.ssm(SCI_CREATEDOCUMENT); + /* * see above: set TECO-style character representations * NOTE: could be done with push_msg() but that requires -- cgit v1.2.3