Hi list.

I've got an NSTextView subclass which implements the NSTextStorage delegate 
method -textStorageWillProcessEditing:. In that method I do syntax highlighting 
and also replace certain substrings with text attachments (a bit like Xcode's 
autocomplete placeholders).

The problem is that the insertion point is always moved to the end of the text 
view each time this method is invoked. It seems to happen whenever I modify the 
attributes of the text, not when I modify the text contents.

Storing the insertion point and restoring it at the end of 
-textStorageWillProcessEditing or in -textStorageDidProcessEditing still result 
in the insertion point being moved to the end sometime later. There are other 
threads online with this problem, but they are old and have no solutions.

Does anyone have any suggestions on how to avoid or work around this problem?

- Ben_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to