microsoft / microsoft/vscode

File tree shifts to the right after invoking rename

Open
#332,459 0 comments 0 reactions 1 assignee Claimed by @lramos15 View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: 1.134.0
OS Version: Sonoma 14.0 (23A344)

Steps to Reproduce:

1. Create a directory structure with long file/folder names (or deep nesting) so that a horizontal scrollbar appears in the file explorer view.
2. Drag the horizontal scrollbar all the way to the left (to the very start of the tree).
3. Select any file or folder.
4. Invoke the rename command – either via the context menu (right-click → Rename) or using a keyboard shortcut.

Actual result:

After the rename action is triggered, the whole tree / directory structure shifts to the right (the horizontal scroll position jumps to the right). This forces the user to scroll back left to see the beginning of the names.

https://github.com/user-attachments/assets/2b96d23a-dced-441f-b483-e1add0ba196e

Expected result:

The horizontal scroll position should remain unchanged when the rename command is called. The tree should stay in place; only the inline rename input field should appear without affecting the overall scroll offset.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.