Commit cabb495
committed
Allow never opening window + terminate on last window, with guards
Previously we disabled this combo in f6ba7dd because when
implemented naively, it causes an issue where just opening an About
MacVim or Settings window could immediately cause MacVim to exit
(because macOS determined that there were no non-auxillary window open).
This was awkward and potentially made it hard to change the setting
back, and exact behavior depended on OS behavior.
However, it seems like there are legit use case for this combo of
settings. Change it so that we allow setting both of them again, but add
checks so that `applicationShouldTerminateAfterLastWindowClosed:` will
only return `YES` if we have opened at least one Vim window before. This
gives the user a chance to open a window first, so using Settings etc
wouldn't immediately terminate the app.
Fix #13381 parent 0944187 commit cabb495
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
551 | 560 | | |
552 | 561 | | |
553 | 562 | | |
| |||
888 | 897 | | |
889 | 898 | | |
890 | 899 | | |
| 900 | + | |
| 901 | + | |
891 | 902 | | |
892 | 903 | | |
893 | 904 | | |
| |||
0 commit comments