koh-sh
5be9dc1781
Fix duplicate window when opening from CLI on macOS ( #48146 )
...
Closes #47140
Closes #44691
When launching Zed from the CLI (`zed .`), macOS delivers the path as a
`kAEGetURL` Apple Event via Launch Services. Zed relied on the
`application:openURLs:` delegate method to receive this, but its timing
relative to `applicationDidFinishLaunching:` is not guaranteed by macOS.
In release builds, the app reaches `didFinishLaunching` before the URL
is delivered, causing it to be missed and a duplicate window to be
opened. This does not reproduce in debug builds due to slower
initialization, which is why the issue was hard to reproduce from
source.
This replaces `application:openURLs:` with a custom `kAEGetURL` Apple
Event handler registered in `applicationWillFinishLaunching:`. Apple
Events are guaranteed to be delivered synchronously between
`willFinishLaunching` and `didFinishLaunching`, ensuring the URL is
always available before startup logic runs.
Release Notes:
- Fixed duplicate window creation when opening files/directories from
the CLI on macOS.
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com >
2026-04-08 23:14:54 -06:00
..
2026-04-08 18:48:25 +00:00
2026-04-01 09:05:03 +00:00
2026-04-01 17:25:32 +00:00
2026-04-08 18:59:33 +00:00
2026-04-08 18:21:02 +00:00
2026-04-08 00:34:54 +00:00
2026-04-09 01:49:33 +00:00
2026-04-08 20:39:02 -03:00
2026-04-07 12:28:19 -03:00
2026-04-08 20:39:02 -03:00
2026-04-07 11:59:12 +02:00
2026-04-01 17:25:32 +00:00
2026-04-01 17:25:32 +00:00
2026-03-30 13:07:13 +00:00
2026-04-02 10:20:49 -07:00
2026-04-08 20:39:02 -03:00
2026-04-07 12:28:19 -03:00
2026-04-07 12:28:19 -03:00
2026-04-02 17:06:57 -03:00
2026-04-07 05:21:47 -04:00
2026-04-08 01:37:24 -04:00
2026-03-27 18:06:56 -07:00
2026-03-31 15:09:16 -04:00
2026-03-27 14:56:46 -07:00
2026-04-05 23:05:35 +01:00
2026-04-05 23:05:35 +01:00
2026-03-27 14:56:46 -07:00
2026-04-02 17:06:57 -03:00
2026-04-08 07:24:37 +00:00
2026-03-30 09:06:59 +00:00
2026-04-06 16:42:20 +00:00
2026-04-01 17:25:32 +00:00
2026-04-07 10:58:35 -07:00
2026-04-01 22:52:19 +00:00
2026-03-31 17:55:05 +02:00
2026-04-08 18:39:17 -04:00
2026-04-08 18:39:17 -04:00
2026-03-25 23:41:09 +00:00
2026-04-01 17:25:32 +00:00
2026-04-08 22:29:16 +03:00
2026-04-01 17:25:32 +00:00
2026-04-07 12:28:19 -03:00
2026-04-02 17:06:57 -03:00
2026-04-03 19:22:17 +05:30
2026-03-27 14:41:25 +01:00
2026-03-31 18:14:18 -07:00
2026-03-31 17:55:05 +02:00
2026-04-08 00:34:54 +00:00
2026-04-07 12:05:02 +02:00
2026-04-09 00:25:25 +00:00
2026-04-03 11:00:13 +00:00
2026-04-07 12:05:02 +02:00
2026-04-09 00:25:25 +00:00
2026-04-08 07:24:37 +00:00
2026-04-07 23:21:17 -03:00
2026-04-01 17:25:32 +00:00
2026-04-07 12:28:19 -03:00
2026-04-08 21:53:00 +05:30
2026-04-01 02:50:01 +00:00
2026-04-08 23:14:54 -06:00
2026-04-08 15:50:36 +00:00
2026-04-07 12:28:19 -03:00
2026-03-31 13:16:53 +00:00
2026-04-03 22:31:03 +03:00
2026-04-04 16:10:22 -04:00
2026-04-08 22:29:16 +03:00
2026-04-07 11:19:21 +05:30
2026-04-07 12:44:19 -03:00
2026-03-28 18:41:33 -04:00
2026-04-01 17:25:32 +00:00
2026-04-01 17:25:32 +00:00
2026-04-08 18:39:17 -04:00
2026-04-07 12:28:19 -03:00
2026-04-02 12:52:42 +00:00
2026-04-07 12:28:19 -03:00
2026-04-08 18:59:33 +00:00
2026-04-07 12:28:19 -03:00
2026-04-07 12:28:19 -03:00
2026-03-25 12:07:34 -06:00
2026-04-01 17:25:32 +00:00
2026-04-06 16:42:20 +00:00
2026-04-02 12:52:42 +00:00
2026-04-01 17:25:32 +00:00
2026-04-07 14:30:22 +05:30
2026-04-06 16:42:20 +00:00
2026-04-02 00:44:53 +00:00
2026-03-27 14:41:25 +01:00
2026-04-07 22:37:00 +00:00
2026-04-07 22:05:43 -03:00
2026-04-07 12:28:19 -03:00
2026-03-27 14:41:25 +01:00
2026-04-07 12:28:19 -03:00
2026-04-01 17:25:32 +00:00
2026-04-07 14:15:33 +00:00
2026-03-31 17:55:05 +02:00
2026-04-07 12:44:19 -03:00
2026-04-08 00:34:54 +00:00
2026-03-31 12:48:22 +03:00
2026-04-09 00:25:25 +00:00
2026-04-08 21:53:43 +05:30
2026-04-06 18:18:59 +00:00
2026-03-26 13:48:18 +00:00
2026-04-07 05:21:47 -04:00
2026-04-08 09:21:39 +00:00
2026-04-08 21:20:02 +03:00
2026-03-27 14:41:25 +01:00
2026-04-08 18:21:02 +00:00
2026-04-07 22:58:03 +02:00
2026-03-30 09:06:59 +00:00
2026-04-06 17:19:29 -03:00
2026-03-27 14:41:25 +01:00
2026-04-07 19:17:49 +03:00
2026-04-08 18:33:00 +05:30
2026-04-08 18:59:33 +00:00
2026-03-25 12:07:34 -06:00
2026-04-02 00:44:53 +00:00
2026-04-08 18:33:00 +05:30
2026-04-09 00:25:25 +00:00
2026-03-27 14:41:25 +01:00
2026-03-29 14:43:05 +00:00
2026-03-31 08:06:37 -06:00
2026-03-31 21:23:42 -03:00
2026-04-02 13:09:29 +00:00
2026-04-07 06:14:00 +00:00
2026-03-30 07:56:00 -07:00
2026-04-07 02:46:30 +00:00
2026-04-01 17:25:32 +00:00
2026-04-07 23:41:34 +00:00
2026-03-27 14:41:25 +01:00
2026-03-27 14:41:25 +01:00
2026-04-07 23:41:34 +00:00
2026-03-27 15:31:49 +00:00
2026-04-08 07:58:50 -03:00
2026-04-01 17:25:32 +00:00
2026-04-08 07:24:37 +00:00
2026-03-27 15:31:49 +00:00
2026-03-27 14:41:25 +01:00
2026-04-08 18:33:00 +05:30
2026-04-08 22:29:16 +03:00
2026-04-07 12:28:19 -03:00
2026-03-27 14:41:25 +01:00
2026-04-08 20:39:02 -03:00
2026-04-08 15:51:05 -04:00
2026-04-07 12:28:19 -03:00
2026-04-08 17:54:51 +00:00
2026-04-07 22:58:03 +02:00
2026-04-02 17:06:57 -03:00
2026-04-02 17:06:57 -03:00
2026-04-06 16:29:37 -04:00