fix: Auto-select name for editing when creating new files/folders#2166
Open
William-Laverty wants to merge 2 commits intoCodeEditApp:mainfrom
Open
fix: Auto-select name for editing when creating new files/folders#2166William-Laverty wants to merge 2 commits intoCodeEditApp:mainfrom
William-Laverty wants to merge 2 commits intoCodeEditApp:mainfrom
Conversation
Implements a recently-closed tab stack on the Editor model. When a tab is closed, its file reference is pushed onto the stack (up to 20 entries). Pressing ⇧⌘T (Shift+Command+T) pops the most recently closed tab and reopens it in the active editor. Changes: - Editor: Add recentlyClosedTabs stack, addToRecentlyClosed(), reopenClosedTab() - CodeEditWindowController: Add reopenClosedTab(_:) action - FileCommands: Add 'Reopen Closed Tab' menu item with ⇧⌘T shortcut Closes CodeEditApp#1656
When creating a new file or folder via the project navigator context menu, the name is now automatically selected for editing (matching the behavior already present in 'New File from Clipboard'). This matches standard IDE behavior where newly created items immediately enter rename mode, allowing the user to type a custom name without an extra step. Fixes CodeEditApp#2029
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.
Summary
When creating a new file or folder via the project navigator context menu, the name is now automatically selected for editing — matching the behavior already present in "New File from Clipboard" and standard IDE conventions (Xcode, VS Code).
Problem
Creating a new file ("New File...") or folder ("New Folder") would create an item named "untitled" but not enter rename mode, requiring the user to manually right-click → Rename or double-click to change the name.
Fix
Added
renameFile()calls innewFile()andnewFolder()after the item is created and highlighted, consistent with the existingnewFileFromClipboard()implementation.Changes
ProjectNavigatorMenuActions.swift: CallrenameFile()after creating new files and foldersFixes #2029