vscode-extension-for-zowe icon indicating copy to clipboard operation
vscode-extension-for-zowe copied to clipboard

Rename causes VS Code to flip through editor tabs

Open lauren-li opened this issue 4 years ago • 2 comments

Describe the bug Renaming data set and USS items via Right click > Rename flips between active editor tabs while completing the rename.

To Reproduce

  1. Have several editor tabs open (at least 3), and take note of which one is currently active
  2. Right-click a data set or USS item
  3. Click on 'Rename'
  4. Type a new name in the dialog box, then press Enter
  5. See VS Code flip through a couple editor tabs before ending on a different active editor tab than in Step 1.
  6. 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.)

Zowe Explorer rename issue - med

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!

lauren-li avatar Aug 06 '20 21:08 lauren-li

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)

zFernand0 avatar Aug 17 '20 19:08 zFernand0

Branch with preliminary work to address this: https://github.com/zowe/vscode-extension-for-zowe/tree/rename-tabs

lauren-li avatar Apr 13 '21 14:04 lauren-li