rgieseke / textredux

Text-based interfaces for Textadept
http://rgieseke.github.io/textredux/
Other
58 stars 11 forks source link

How can I tell a textredux buffer from other textadept buffers? #6

Closed jugglerchris closed 11 years ago

jugglerchris commented 11 years ago

Hi,

I tweak various settings in new buffers based on BUFFER_NEW etc. events. At least one of those things (buffer.wrap_mode) I'd prefer not to do on textredux list buffers. Is there a way I can reliably recognize them from the event handler so as to avoid changing those settings?

Regards,

Chris

rgieseke commented 11 years ago

Hi Chris,

you can check for buffer._textredux, I use this for example to hide the line numbers of Textredux buffers in my common.highlight module: http://rgieseke.github.io/ta-common/highlight.html

(Textredux updates for latest API changes are in the works …)

jugglerchris commented 11 years ago

Great, thanks. Is that documented anywhere I missed?

rgieseke commented 11 years ago

Probably not. Let's keep this ticket open and I'll add it since I have to go through the docs anyway.

rgieseke commented 11 years ago

Added a note on using buffer._textredux in the last release. Thanks again for the report!