-
-
Notifications
You must be signed in to change notification settings - Fork 101
Description
Describe the project you are working on
A platformer
Describe the problem or limitation you are having in your project
In my Output log I'm looking for a specific printed event "PRESSED KEY". But I also need to check the state of a variable very frame so my Output is spammed with "true/false" entries. I'm interested in checking the variable value right after the event "PRESSED KEY".
Currently, it's impossible to search a specific text and show the surrounding lines (context). Ctrl+F opens the filter panel which will find "PRESSED KEY" but hide the surrounding lines. There is no way to click on the log entry to select that line and then clear the filter to reveal the matching line in context, as we'd do e.g. in FileSystem.
The only way to find a specific line and its context is to manually scroll... or copy the whole log to some text editor and search there.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add true classic search to the Output panel. It would allow to find all text matches, and go to previous/next match.
Suggested binding: Ctrl+F, it would replace the filter, which would use Ctrl+Alt+F or Ctrl+Shift+F instead, since Ctrl+F for classic search/find is more common.
Alternative 1: allow clicking on a log entry to select it then when user clears the filter, they'll see the line in context. But that's still more clicks anyway so not my favorite, just a nice addition.
Alternative 2: option to indicate the number of lines to show above and below lines matching filter (similar to grep -C option), to show line context. You'd have to add some line separator between results + context and play with colors to distinguish actual matching lines from their surrounding context. I like this one but it seems more complicated to implement, so maybe for another proposal.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Ctrl+F > Open classic search field
Enter string > auto-scroll to "closest" match (pick a convention, maybe the first match upward is easier than "closest" in any direction) and highlight all matches (inspired by Code Editor except we tend to want to go up when reading logs)
Press Enter/F3 > next match (pick a convention, maybe next match would be toward bottom to simplify and not reverse everything)
Press Shift+Enter/Shift+F3 > previous match
All bindings would be customizable
Ctrl+Alt+F > Open (existing) filter field
The easiest is to only show one field at a time, but I see some usage for filtering and search among the filtered results, so if you manage to show and enable for search features simultaneously, it's even better.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, I'd probably need to rewrite the Output panel
Is there a reason why this should be core and not an add-on in the asset library?
Native Output panel