mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-29 18:41:40 +00:00
macos: have macos-dock-drop-behavior apply to all drops
This commit is contained in:
@@ -405,14 +405,6 @@ class AppDelegate: NSObject,
|
||||
// When opening a directory, check the configuration to decide
|
||||
// whether to open in a new tab or new window.
|
||||
config.workingDirectory = filename
|
||||
|
||||
let behavior = ghostty.config.macosDockDropFolderBehavior
|
||||
if behavior == .window {
|
||||
_ = TerminalController.newWindow(ghostty, withBaseConfig: config)
|
||||
} else {
|
||||
// Default to tab behavior
|
||||
_ = TerminalController.newTab(ghostty, withBaseConfig: config)
|
||||
}
|
||||
} else {
|
||||
// When opening a file, we want to execute the file. To do this, we
|
||||
// don't override the command directly, because it won't load the
|
||||
@@ -424,8 +416,11 @@ class AppDelegate: NSObject,
|
||||
// Set the parent directory to our working directory so that relative
|
||||
// paths in scripts work.
|
||||
config.workingDirectory = (filename as NSString).deletingLastPathComponent
|
||||
|
||||
_ = TerminalController.newWindow(ghostty, withBaseConfig: config)
|
||||
}
|
||||
|
||||
switch ghostty.config.macosDockDropBehavior {
|
||||
case .new_tab: _ = TerminalController.newTab(ghostty, withBaseConfig: config)
|
||||
case .new_window: _ = TerminalController.newWindow(ghostty, withBaseConfig: config)
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user