Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in Sublime Text when Double-Clicking Lines in View with result_file_regex and result_line_regex #6468

Open
TerminalFi opened this issue Aug 29, 2024 · 0 comments
Assignees

Comments

@TerminalFi
Copy link

Description of the bug

I’ve encountered an issue where Sublime Text crashes when a line is double-clicked in the output_view created by the CrashSublimeTextCommand. The crash seems to be triggered by the result_file_regex and result_line_regex settings.

Steps to reproduce

  1. Add the following command to a Sublime Text plugin
class CrashSublimeTextCommand(sublime_plugin.WindowCommand):
    def run(self):
        output_view = self.window.new_file()
        output_view.set_name("Crash Results")
        output_view.settings().set("result_file_regex", "^([^ \t].*):$")
        output_view.settings().set(
            "result_line_regex",
            "^ +([0-9]+):",
        )

        formatted_results = [
            "~/boot.py:",
            "4: def reload_plugin() -> None:",
            "15: reload_plugin()",
        ]

        output_view.run_command("append", {"characters": "\n".join(formatted_results)})
  1. Execute the CrashSublimeTextCommand to create a new view with the specified content.
  2. Double-click any line in the output_view.

Expected behavior

Should navigate to the file identified or throw an error message if no file was found

Actual behavior

ST crashes and does not have a crash reporter.

Sublime Text build number

4178

Operating system & version

macOS 15

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information

No response

@BenjaminSchaaf BenjaminSchaaf self-assigned this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants