diff options
author | nyamatongwe <devnull@localhost> | 2004-04-06 10:15:33 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2004-04-06 10:15:33 +0000 |
commit | b3de013a2e1a11c50f3d664e425b828a3688d395 (patch) | |
tree | 2ff28d2d8b935fcad5c8b0a8d04a787546b95451 /src | |
parent | 5d75fc00daa8d847d7f04e27caa53e12f6d1f743 (diff) | |
download | scintilla-mirror-b3de013a2e1a11c50f3d664e425b828a3688d395.tar.gz |
SCI_SETTEXT made a single undo action.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |