Sublime Forum

Event when View.visible_region changes?

#1

Is there some event (or hack) that I can use to know when the visible_region of a view has changed?

I’m interested in changes due to movement on a trackpad or from a mouse scroll wheel. Moving the cursor/selection fires on_selection_modified[_async] of course, but view region changes due to trackpad/mouse wheel do not change the selection.

I can do with it with a timeout, blech.

Thanks,
Toby

0 Likes

#2

afaik, timeouts are the only option atm, until some new apis are added. Even if you were to be able to detect scroll wheel events, it would miss when the window is resized (or the layout is changed etc like panes/menu or tab visibility)
you can vote for them at

0 Likes

#3

Thanks, guess I’ll stick with that then.

Put my $0.02 on the issue!

Toby

0 Likes