Skip to content

🐞 DelegatedUndoManager undo groups not working as expected #68

Closed
@hi2gage

Description

@hi2gage

Description

DelegatedUndoManager does not override

func beginUndoGrouping()
func endUndoGrouping()

so calling

textView.undoManager?.beginUndoGrouping()

here and here does not undo as group as expected.

To Reproduce

  1. Open CodeEditSourceEditorExample.xcodeproj (to get access to multi-line actions
  2. Select multiple lines
  3. Press Tab, Shift Tab, or CMD+/ to do a multi-line action
  4. Click undo or CMD-z
    See that one line at a time is undone

Expected Behavior

The entire multi line action should be undone at once.

Version Information

CodeEditTextView: main
macOS: 15.2 (24C101)
Xcode: Version 16.1 (16B40)

Additional Context

No response

Screenshots

CEUndoManager_before.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    🏁 Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions