Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Notepad3.c
Original file line number Diff line number Diff line change
Expand Up @@ -9742,6 +9742,11 @@ inline static LRESULT _MsgNotifyLean(const SCNotification* const scn, bool* bMod
bool const bInUndoRedoStep = (iModType & (SC_PERFORMED_UNDO | SC_PERFORMED_REDO));
if (iModType & SC_MOD_INSERTCHECK) {
if (!bInUndoRedoStep) {
if (Settings.SplitUndoTypingSeqOnLnBreak && (scn->length > 0) && ((scn->text[0] == '\r') || (scn->text[0] == '\n'))) {
// split the undo transaction BEFORE the line break, so the next transaction
// will include both the line break and subsequent auto indentation.
_SplitUndoTransaction();
}
_HandleInsertCheck(scn);
}
}
Expand Down Expand Up @@ -9848,11 +9853,6 @@ static LRESULT _MsgNotifyFromEdit(HWND hwnd, const SCNotification* const scn)
int const iModType = scn->modificationType;
if (scn->linesAdded != 0) {
EditBookmarkAdjustNavigation(SciCall_LineFromPosition(scn->position), scn->linesAdded);
if (Settings.SplitUndoTypingSeqOnLnBreak && (scn->linesAdded > 0)) {
if (!(iModType & (SC_PERFORMED_UNDO | SC_PERFORMED_REDO))) {
_SplitUndoTransaction();
}
}
}
if (s_bInMultiEditMode && !(iModType & SC_MULTILINEUNDOREDO)) {
if (!Sci_IsMultiSelection()) {
Expand Down