Repository navigation
Keep Cmd-Shift-N windows on source display #3214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
88a7e1c
e910c34
8f7eb77
40f4b4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7683,7 +7683,9 @@ struct ContentView: View { | |
| } | ||
| } | ||
| registry.register(commandId: "palette.newWindow") { | ||
| AppDelegate.shared?.openNewMainWindow(nil) | ||
| AppDelegate.shared?.openNewMainWindow( | ||
| preferredWindow: AppDelegate.shared?.mainWindow(for: windowId) | ||
| ) | ||
| } | ||
|
Comment on lines
7685
to
7688
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
registry.register(commandId: "palette.newWindow") {
guard let delegate = AppDelegate.shared else { return }
delegate.openNewMainWindow(preferredWindow: delegate.mainWindow(for: windowId))
}Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed by capturing AppDelegate.shared once in the palette command and using that delegate for both the lookup and the new-window call. — Claude Code |
||
| registry.register(commandId: "palette.installCLI") { | ||
| AppDelegate.shared?.installCmuxCLIInPath(nil) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clampFrameis called withminWidth: 1, minHeight: 1. If the source window is so large that it nearly fills the display and the 24-pt cascade pushes the new window outside the visible frame, the clamp will shrink it down to as small as 1×1 pt — effectively invisible and non-resizable in practice. Other call sites in the file typically pass something closer to the minimum usable size. Consider using a sensible minimum (e.g., the default 460×360 fallback rect) so the window remains functional after clamping.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by using the app's default minimum window size when clamping the cascaded frame, so the new window remains usable on constrained displays.
— Claude Code