Skip to content

Results tab is always empty on ST4 (replace called with the edit of another view) #13

Open

Description

@dpc00

Claude reports:

The "Bound Keys" results tab is always empty on Sublime Text 4. Sublime Text build 4215, Windows 11, BoundKeys from Package Control.

boundkeys.py ends with:

results = view.window().new_file()
results.set_scratch(True)
results.set_name("Bound Keys")
newRegion = sublime.Region(1, 0)
results.replace(edit, newRegion, text)

The edit object belongs to the original view, not to results, so the text is not inserted: a tab named "Bound Keys" opens, empty, with nothing in the console. I saw this after working around the 'bool' object is not iterable error (see #11), so the empty tab happens even when the keymaps are read.

Tested fix: replace the last two lines with results.run_command("append", {"characters": text}). The tab then shows the full table (Batch File, BoundKeys, C++ ... key bindings with the commands and contexts).

Activity

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