Sublime Forum

Sublime crash after setting "result_file_regex" for a view

#1

I hope all the related information is reflected in the screen cut.

Give more details:

  • I generated a “table of contents” for a file (e.g. action_named.py) in another file (1a.txtgg)
  • I call “xveq” to set up the “result_file_regex”
  • Sometimes (sometimes not), I double click some line in “1a.txtgg”, sublime will crash.

This is the first time I came across the crashing of sublime, I do not know if this is related to the new version (update last week?). My license has passed time but I still can use the latest dev build, before that I use 4150.

0 Likes

#2

Does this also happen in Safe Mode?

I do not recall having seen any reports that navigation of this sort crashing Sublime.

0 Likes

#3

Thank you. You are right, all of the following work in the safe-mode.

And, This also works.

Something is wrong elsewhere, but I have no clue.

0 Likes

#4

This is the function. Maybe you can try this.


class Xveq(sublime_plugin.TextCommand):
    # view, result_file_regex
    def run(self, edit):
        view = self.view
        print(f"{view=}")
        settings = view.settings()
        settings.set("result_file_regex", r"^File -- (.*) -- (\d+):(\d+)")
        settings.set("result_line_regex", r"^\s*(\d+)\|.*")
        print("pick vmb")
0 Likes

#5

Close.
I don’t encounter this problem any more, but I don’t know the exact reasons.

0 Likes