Skip to content

Status bar never shows class/def names on Sublime Text 4 #1

Open

Description

@dpc00

Claude reports:

On Sublime Text 4 the status bar never shows the class and function names, so the plugin does nothing visible.

PythonStautsBarShowSymbol 2014.09.11.05.22.46 from Package Control, Sublime Text build 4215, Windows. In a Python tab with

class Foo:
    def bar(self):
        x = 1
        return x

I put the cursor on line 3 and on line 4. The status bar shows only "Line 3, Column 1" / "Line 4, Column 1"; the expected ->class Foo->def bar message never appears, and the console has no error.

Cause: on_selection_modified picks the regex with if sublime.version()[0]=='3'. On Sublime Text 4 sublime.version() is '4215', so it takes the Sublime Text 2 branch, r'\s*(def|class)\s+(\w*)'. view.get_symbols() returns only the names here (get_symbols gives Foo and bar, without class or def), so that regex never matches and strs stays empty.

Fix (not run): choose the branch with int(sublime.version()) >= 3000 instead of looking at the first character.

Activity

  1. scriptkitz commented on Oct 26, 2026

    @scriptkitz
    Owner

    Fixed. It will be updated to the repository in 1~2 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions