Repository navigation
View as Text from the Command Palette opens the dictionary's text - #193
Merged
Merged
Conversation
The palette runs a command with no argument, and lists View as Text only while a table has focus. A table is a webview, so there is no active text editor to take the file from, and the command does nothing. The new test opens the JSON dictionary's table, runs View as Text with no argument and expects its text in a second tab: it fails on this commit. Two more pin the palette's View as Table: from a text editor it opens the table beside it, and on a compressed dictionary already in its table it leaves the one tab as it is.
The palette passes no argument, and both toggle commands fell back to the active text editor's document. The palette lists View as Text only while a table has focus, when there is no active text editor (a table is a webview), so the command found no file and did nothing. Both commands now take the file from the active tab, a custom editor's or a text editor's, and only then from the active text editor.
This was referenced Nov 1, 2026
ww-mw
added a commit
that referenced
this pull request
Nov 2, 2026
Both add ## Unreleased to CHANGELOG.md: one heading now, #193's bullet first, then this one's.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Command Palette runs a command with no argument. It lists View as Text only while a table has focus (
resourceExtname == .sldd && activeCustomEditorId == dataExplorer.tableView), and a table is a webview, sovscode.window.activeTextEditoris undefined then:dataExplorer.viewAsTextfound no file and returned without doing anything.dataExplorer.viewAsTablehad the same fallback.Fix (
src/extension.ts):activeResourceUri()takes the file from the active tab (TabInputCustomorTabInputText,.uri), then fromactiveTextEditor. Both toggle commands use it when called with no argument; the editor/title buttons still pass the file and are unchanged.Tests (
test-integration/suite/toggle.test.ts), committed alone first:TabInputText). Failed on unchangedsrc/(run 41357910826: "timed out after 20000ms waiting for the plain text editor for the URI to become active"); passes with the fix.binarySlddView, which the palette'sresourceExtname == .slddalso matches) leaves the one tab as it is (passed before and after: before, nothing ran; now its best editor is the one it is in).CI: red 41357910826 (test only: 211 passing, 1 failing), green 41358267708 (212 passing, 9 pending). Unit: 1305 passed.
CHANGELOG: one bullet under a new
## Unreleasedheading. No release.