Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## `3.6.0`

- Bugfix: Fixed switching editor tabs not updating the displayed content (the previously active buffer stayed on screen) ([#410](https://github.com/zowe/zlux-editor/pull/410))
- Bugfix: Changed initialization of menu action and disabled functions. Now, functions are used as opposed to strings that were evaluated into functions. ([#401](https://github.com/zowe/zlux-editor/pull/401))
- Bugfix: Hardened the language server (LSP) configuration to demand "wss://" urls rather than permitting "ws://". ([#400](https://github.com/zowe/zlux-editor/pull/400))
- Bugfix: Fixed a JSON injection flaw in "Open in new tab" and "Copy permalink" where USS file/directory names containing `"` or `\` were concatenated directly into the launch payload string. Crafted names could override the `type`/`name`/`lines` keys and cause a different file or dataset to be opened than displayed. ([#396](https://github.com/zowe/zlux-editor/pull/396))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,9 +749,16 @@ export class MonacoService implements OnDestroy {
}

fileDuplicateChecker(uri: string): boolean {
// Normalize the incoming uri the same way models are created/looked up
// (via monaco.Uri.parse). Models are registered under their parsed
// Uri.toString(), which can differ from the raw generateUri() string;
// comparing the raw string here would miss an existing model and cause
// createModel() to throw "model already exists", leaving the editor on
// the previous buffer when switching tabs.
const normalizedUri = monaco.Uri.parse(uri).toString();
const models = this.editorControl.editorCore.getValue().editor.getModels();
for (const model of models) {
if (model.uri.toString() === uri) {
if (model.uri.toString() === normalizedUri) {
return true;
}
}
Expand Down
Loading