Sublime Forum

Tweak behavior of "NextResultCommand"

#1

Hi,
I’d like to tweak the behavior of the “next_result” command.
Namely I’d like to avoid opening non existing file when using it.
It’s a bit annoying when the “next_result” is iterating through a stack trace where I don’t have all the source code associated with.

I looked for a NextResultCommand in the Default package but didn’t find any.

0 Likes

#2

my guess would be it’s a built in command that we can’t see the source of. Probably the regex you use in the build system needs to be tweaked (if possible) to ignore stack traces?

0 Likes

#3

I like being able to jump along the stack trace, my problem is the stack trace is often polluted by call from the unit test framework. So when I press “f4” it opens non exisitng files in a new tab. After that I need to close all those files, and confirm each time to “discard the changes”.

0 Likes

#4

ah I see :slightly_smiling:
I guess the only way to control the behavior would be to create an on_post_window_command EventListener method that will automatically mark the tab as scratch/non-dirty when the command is next_result and the current tab is empty and the file doesn’t exist

it might be a good idea to raise it as a feature request/enhancement :slight_smile:

2 Likes

#5

Ok I might try that, thanks for the hint :slightly_smiling:

0 Likes