mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-25 17:45:36 +00:00
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.
Requires objj be installed, as well as ojunit, located at http://github.com/cappuccino/ojunit
Run individual tests using a command similar to the following:
objj ojunit/OJTestRunnerText.j cappuccino/Tests/Foundation/CPDateTest.j