Closed laughedelic closed 11 years ago
In what situations would the cursor be outside of the viewable area? It should only highlight those characters that are in the viewable area (unless the character is under the text input box that comes up, and I've got a fix I'm working on for that in the 013_implement_mode branch, but there's more work to do there).
Does this do something additionally that I'm missing? From what I've seen, it doesn't seem to hurt anything to have this, I'm just wondering if there are use cases (maybe with already highlighted text?) that I'm not understanding.
No, it isn't anything special. My use case is that I may scroll somewhere in a big file, just viewing it, and then I want to place cursor on a position in that area and I don't want to point it with mouse, because that what this plugin is for.
Ah! I see, I hadn't ever used it where I've scrolled the view to somewhere when the cursor isn't actually already in the viewable area. That makes sense and this patch is a useful one then. I'll merge this, and I can also merge in the other one you had to fix the stacktrace in the console.
thanks!
Cool. thanks for your plugin! It's great.
The problem is that if cursor is outside of the visible area and you want to jump to a region inside visible area, it places cursor on that region, but view is scrolled to the place, where it was before.
I've just added
self.view.show(winning_region
to scroll to the chosen region.