CPTextView lacked implementations for copyFont: and pasteFont:
(declared as abstract methods in CPText), causing standard Copy Style and Paste Style menu items to trigger exceptions when invoked.
* AppKit/CPTextView/CPTextView.j:
- Implement copyFont: to copy character attributes (excluding paragraph style, matching Cocoa) of the initial selection character or current typing attributes to the font pasteboard.
- Implement pasteFont: to apply copied character attributes to the selection or typing attributes with undo support, preserving individual paragraph styles.
- Update menu validation logic to enable Copy Style in rich text and Paste Style in editable rich text when the font pasteboard contains valid styling.
* Tests/AppKit/CPTextViewTest.j:
- Add unit tests covering style copying and pasting with and without active selections.
- Add test coverage for menu validation.
* Tests/Manual/TextEditor/WORKLIST.md:
- Record Copy Style and Paste Style as tested.
Copy Style and Paste Style now function consistently with Cocoa.
CPTextView lacked the superscript:, subscript:, unscript:, raiseBaseline:, and lowerBaseline: action methods.
Consequently, standard Baseline menu items targeting these actions were automatically disabled,
even though CPTypesetter and _CPLineFragment already possessed full layout support for baseline offset and superscript attributes.
* AppKit/CPTextView/CPTextView.j:
- Implement superscript:, subscript:, unscript:, raiseBaseline:, and lowerBaseline:.
- Apply attribute modifications to selected ranges or current typingAttributes.
- Register baseline operations with CPUndoManager.
- Implement menu validation logic to enable baseline actions only when the text view is editable and richText is true.
* Tests/AppKit/CPTextViewTest.j:
- Add unit tests for superscript levels and baseline offsets across text ranges and typing attributes.
- Add test coverage for menu validation.
* Tests/Manual/TextEditor/WORKLIST.md:
- Remove resolved baseline management entry.
- Expand documentation on text layout and line fragment drawing.
- Document open items: Justify crash, kerning/ligature settings, and Font Panel integration.
- Note optimal line breaking as a candidate feature for future improvement.
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.