From b3de013a2e1a11c50f3d664e425b828a3688d395 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 6 Apr 2004 10:15:33 +0000 Subject: SCI_SETTEXT made a single undo action. --- src/Editor.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index f1f1adb82..e4205b861 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1413,8 +1413,8 @@ void Editor::NeedWrapping(int docLineStartWrapping, int docLineEndWrapping) { if (docLastLineToWrap >= pdoc->LinesTotal()) docLastLineToWrap = pdoc->LinesTotal()-1; // Wrap lines during idle. - if ((wrapState != eWrapNone) && - backgroundWrapEnabled && + if ((wrapState != eWrapNone) && + backgroundWrapEnabled && (docLastLineToWrap != docLineLastWrapped)) { SetIdle(true); } @@ -5431,9 +5431,11 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_SETTEXT: { if (lParam == 0) return 0; + pdoc->BeginUndoAction(); pdoc->DeleteChars(0, pdoc->Length()); SetEmptySelection(0); pdoc->InsertString(0, CharPtrFromSPtr(lParam)); + pdoc->EndUndoAction(); return 1; } -- cgit v1.2.3