This is my attempt at fixing #63. It works! But:
1. The `NotificationCenter` subscription is triggered once for every
open tab. That's obviously wrong. But I'm not sure and could use some
pointers where else to put the subscription. That leads me to...
2. I'm _not_ knowledgable in Swift/AppKit/SwiftUI, so I might have put
the wrong/right things in the wrong/right places. For example: wasn't
sure what's to be handled in Swift and what's to be handled by the
core in Zig.
Would love some pointers :)
This is, as it turns out, the simple version of #166.
It changes the quit dialog to handle return by removing the
`.destructive` role from the `Quit` button.
When that role is set, the `keyboardShortcut(.defaultAction)` doesn't have an effect.
With the role removed, the dialog handles the return key to quit the
application
As I wrote in #166, I can understand if you don't want this change, but
I personally think it's nice to be able to only use the keyboard. iTerm2
also handles return like this in the "Are you sure?" dialog.
This should fix#158. Instead of manually copying the resources, we
create a relative dependency from the xcodeproj directly so that
xcodebuild should handle this for us.
When making a split, the window focus doesn't change so the new splits
were defaulting to "false" (not focused). Let's just assume when a
surface is created that it is in fact focused. This generally fixes the
issue.
If we ever programmatically create splits in background windows this
will probably fail so we should find a way on View init to detect if the
window has focus.
We previously used the "screen.viewportIsBottom" check but this is
always true since awhile back since we copy only the viewport now. A
cleaner check really is that we only track the cursor cell if we're even
drawing the cursor.