Index: .github/workflows/linux-build.yml ================================================================== --- .github/workflows/linux-build.yml +++ .github/workflows/linux-build.yml @@ -3,10 +3,11 @@ push: branches: - "main" - "core-8-branch" - "core-8-6-branch" + - "bug-ab839efc5f" tags: - "core-**" permissions: contents: read defaults: Index: .github/workflows/mac-build.yml ================================================================== --- .github/workflows/mac-build.yml +++ .github/workflows/mac-build.yml @@ -3,10 +3,11 @@ push: branches: - "main" - "core-8-branch" - "core-8-6-branch" + - "bug-ab839efc5f" tags: - "core-**" permissions: contents: read env: Index: .github/workflows/win-build.yml ================================================================== --- .github/workflows/win-build.yml +++ .github/workflows/win-build.yml @@ -3,10 +3,11 @@ push: branches: - "main" - "core-8-branch" - "core-8-6-branch" + - "bug-ab839efc5f" tags: - "core-**" permissions: contents: read env: Index: generic/tkText.c ================================================================== --- generic/tkText.c +++ generic/tkText.c @@ -5056,10 +5056,14 @@ int status; if (!textPtr->sharedTextPtr->undo) { return TCL_OK; } + + if (textPtr->sharedTextPtr->autoSeparators) { + TkUndoInsertUndoSeparator(textPtr->sharedTextPtr->undoStack); + } /* * Turn off the undo feature while we revert a compound action, setting * the dirty handling mode to undo for the duration (unless it is * 'fixed'). @@ -5074,10 +5078,14 @@ if (textPtr->sharedTextPtr->dirtyMode != TK_TEXT_DIRTY_FIXED) { textPtr->sharedTextPtr->dirtyMode = TK_TEXT_DIRTY_NORMAL; } textPtr->sharedTextPtr->undo = 1; + + if (textPtr->sharedTextPtr->autoSeparators) { + TkUndoInsertUndoSeparator(textPtr->sharedTextPtr->undoStack); + } return status; } /* Index: tests/text.test ================================================================== --- tests/text.test +++ tests/text.test @@ -6965,10 +6965,25 @@ .t edit reset update ; lappend res $nbUS } -cleanup { destroy .t } -result {0 0 1 2 3 4 4 5 6 6 7 8 8 9} +test text-27.26 {bug ab839efc5f - .text edit undo inserts separators} -setup { + destroy .t +} -body { + text .t -undo 1 + .t insert 1.0 "1. 123 5 789012 LINE-1\n2.\n3. 123 5 789012 LINE-3\n" + .t tag add sel 3.0 3.end + .t delete sel.first sel.last + .t edit undo + .t tag add sel 3.0 3.end + .t delete sel.first sel.last + .t edit undo + .t get 3.0 3.end +} -cleanup { + destroy .t +} -result {3. 123 5 789012 LINE-3} test text-28.1 {bug fix - 624372, ControlUtfProc long lines} -body { pack [text .t -wrap none] .t insert end [string repeat "\1" 500]