Files
cappuccino/AppKit
David Richardson 66ea130c8d AppKit: Disable Undo and Redo when a text view does not allow undo
A text view handled undo: and redo: and registered its changes even when allowsUndo was NO, so Edit > Undo stayed enabled and did nothing.

Behaviour now follows canonical Cocoa: a text view that does not allow undo registers nothing and passes undo: and redo: on to the window, and Undo and Redo are enabled only when there is a change to undo or redo.

* CPTextView/CPTextView.j: Register changes only when undo is allowed, stop responding to undo: and redo: when it is not, and validate the Undo and Redo items against the undo manager.

* CPWindow/CPWindow.j: Validate the Undo and Redo items against the window's undo manager.

* Tests/AppKit/CPTextViewTest.j: Add tests for responding to undo:, registering changes and validating the Undo item.

* Tests/Manual/TextEditor/DocumentWindowController.j: Add toggleAllowsUndo: and validateMenuItem:, so that undo can be turned on and off for the active document.

* Tests/Manual/TextEditor/Resources/MainMenu.xib, Resources/MainMenu.cib: Add Edit > Allow Undo.

* Tests/Manual/TextEditor/WORKLIST.md: Remove the entry for this gap, record Allow Undo as tested, and add the key equivalent behaviour of disabled menu items for discussion.
2026-10-23 17:20:27 -06:00
..
2013-01-23 15:48:55 +07:00
2025-09-02 17:38:10 +03:00
2026-07-21 15:15:53 -06:00
2026-07-21 15:15:53 -06:00
2026-04-03 19:00:09 +02:00
2013-01-23 15:48:55 +07:00
2025-12-26 10:42:41 +01:00
2013-01-24 19:18:39 +08:00
2016-02-06 20:39:49 +01:00
2016-02-06 20:39:49 +01:00
2026-07-21 15:15:53 -06:00
2026-07-21 15:15:53 -06:00
2026-07-21 15:15:53 -06:00
2026-07-21 15:15:53 -06:00
2026-07-21 15:15:53 -06:00
2026-07-21 15:15:53 -06:00
2026-08-25 21:09:51 +02:00