@Alan-Kilborn said in New feature: Allow additional line on each search results:
I can’t tell if you’ve considered this, but one way to do it would be in conjunction with hiding lines. You could hide lines that don’t meet the criterion of -M through +N, where M would be a user-chosen number of lines before the hit, and N a user-selected count of lines after the search match.
At first thought, I believe that would be significantly easier to implement than doing it in the search results window. As a plus, it (or a close approximation) could even be available after the search with something like an “expand visible blocks” command.
The downside is that Show commands only work on the current document; you can’t show in all open documents (and it wouldn’t even make sense for find in files, whenever I finally get that done). At present, my use of hidden lines (using Scintilla’s function directly) and Notepad++’s way of doing it (keeping its own internal table, inaccessible to plugins, of what ranges are hidden) are at odds with one another, which causes any changes my plugin has made to hidden lines to be lost when any other tab is switched into the view. Thus far, I have not been able to devise any solution to this.