NSTextView scrolls to top when text storage changes
NSTextView scrolls to top when text storage changes
- Subject: NSTextView scrolls to top when text storage changes
- From: Martin Hewitson <email@hidden>
- Date: Sat, 07 Jul 2012 06:47:05 +0200
Dear List,
I have a document managing app which has a project search feature for searching through the project's managed files (see thread "Dynamic modification of text search results" earlier this week).
When I find search matches I add an attribute to the textstorage in which the search term was found. For the file/textstorage that is currently displayed in the editor (the NSTextView), this has the consequence of scrolling the text view to the top. The selection is not changed - just the scrollview jumps to the top.
I assume this must be a bug. I've checked every place in the code where I respond to NSTextStorageDidProcessEditingNotification, and none of these is responsible for the scrolling.
Has anyone else seen this behaviour? Is this a known issue? If so, is there a workaround?
Many thanks,
Martin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden