Skip to content

Open launch files in window tabs - #425

Open
yusufm wants to merge 1 commit into
schuyler:mainfrom
yusufm:Codex/open-multiple-files-in-tabs-019def52-b3da-7962-96cd-afa05d8d1592
Open

Open launch files in window tabs#425
yusufm wants to merge 1 commit into
schuyler:mainfrom
yusufm:Codex/open-multiple-files-in-tabs-019def52-b3da-7962-96cd-afa05d8d1592

Conversation

@yusufm

@yusufm yusufm commented May 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • open pending launch files sequentially so their windows can be grouped
  • add additional files from a multi-file open as native macOS tabs
  • keep single-file launch opens on the normal document path

Tests

  • xcodebuild build -workspace "MacDown 3000.xcworkspace" -scheme MacDown -destination 'platform=macOS'

Related to #408

@schuyler schuyler left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @yusufm!

Issues

  • Nil document on open failure: when a document fails to open, the nil result flows into MPWindowForDocument and silently breaks tab grouping for every later file in the batch.

Suggestions

  • Global tabbing flag: setAllowsAutomaticWindowTabbing:YES runs unconditionally on every activation and persists for the whole session, so scoping it to the multi-file case would avoid overriding the user's system setting.
  • Pending list cleared early: filesToOpen is cleared before any open completes, so a failure or crash mid-open would lose the remaining files.
  • Brief comments: a sentence on the recursive chain and the "nil tabbedToWindow means this file becomes the anchor" invariant would aid future readers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants