[TxMt Plugins] Re: textmate-plugins Digest, Vol 13, Issue 2

Jon Lee jonlee554 at gmail.com
Tue Aug 23 07:47:20 UTC 2011


If it isn't possible to monitor the bookmarks for a document, then how can I get the proper line number based on the mouse down click position?

I figured out that I can swizzle the [OakTextView eventPosition:] selector to get a line number based on the mouse down position, but the line number assumes that there is no line wrapping. Is there a way to convert that number into the real line number in the document? The one caveat in this situation is that I am looking for clicks in the gutter, and not in the text view itself, which means that I can't listen for changes in the caret position, since clicking in the gutter to toggle bookmarks doesn't change the caret position.

Thanks!

On Aug 15, 2011, at 5:00 AM, textmate-plugins-request at lists.macromates.com wrote:

>> Is there a method I could hook into (or swizzle) when the bookmarks of a
>> file changes? [?]
> 
> The internals of TextMate is C++ so I don?t think there as an easy way to hook into this.



More information about the textmate-plugins mailing list