Centre the cursor vertically after search etc.



  • I have a personal plugin, and one feature I use quite frequently, scrolls the file vertically so as to centre the cursor if possible. I find this invaluable, because it lets you see something in context.

    What would be much better, would be if other operations - such as search and bracket match - that move the cursor vertically did the same thing, at least if the cursor would end up very close to the top/bottom of the page.

    Ideally this would be a nice enhancement to NP++, but if anyone knows how to combine an existing NP++/Scintilla command with some extra plugin code (e.g. how to invoke the search dialog from within the plugin, retaining control after the search has been performed) that would be interesting.


Log in to reply