aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2004-04-06 10:15:33 +0000
committernyamatongwe <unknown>2004-04-06 10:15:33 +0000
commit7b4c5a14ec6adbd84692857fd9792d02459585af (patch)
tree2ff28d2d8b935fcad5c8b0a8d04a787546b95451 /src
parentc736119c81bc75d66ad35e5b1ce750f954efebd1 (diff)
downloadscintilla-mirror-7b4c5a14ec6adbd84692857fd9792d02459585af.tar.gz
SCI_SETTEXT made a single undo action.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx6
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;
}