vscode-extension-for-zowe
vscode-extension-for-zowe copied to clipboard
Rename causes VS Code to flip through editor tabs
Describe the bug Renaming data set and USS items via Right click > Rename flips between active editor tabs while completing the rename.
To Reproduce
- Have several editor tabs open (at least 3), and take note of which one is currently active
- Right-click a data set or USS item
- Click on 'Rename'
- Type a new name in the dialog box, then press Enter
- See VS Code flip through a couple editor tabs before ending on a different active editor tab than in Step 1.
- Rename is completed
Screenshot (Note: This gif demonstrates the issue with local Zowe Explorer files open, but the issue occurs just the same when anything is open in the editor tabs, including files/data sets opened through Zowe Explorer.)
Expected behavior Right click > Rename should rename data set and USS items without changing the active editor tab.
Desktop
- OS: Mac OS
- Zowe Explorer Version: 1.8.0
- (Optional) Zowe CLI Version: 6.13.0
Additional context
This issue is due to the closeOpenedTextFile()
function that was added 2 months ago: https://github.com/zowe/vscode-extension-for-zowe/blob/master/src/dataset/DatasetTree.ts#L690
Thanks @jellypuno for this tip!
It seems that an unexpected error can pop-up due to server instability after a rename action occurs. (Happened to me earlier today) Steps?:
- Someone has a few datasets and USS files already opened
- They rename something
- Some dataset fails to be retrieved (I tried reproducing by deleting the dataset outside of Zowe Explorer, but no luck)
Branch with preliminary work to address this: https://github.com/zowe/vscode-extension-for-zowe/tree/rename-tabs