Fix logic behind Mac theme variant inference
The previous implementation could never possibly work, because every set background=… changes effectiveAppearance of MMVimView and therefore overrides the global value as set in the Preferences.app. In short, it essentially becomes just a mirror of background variable. 😛
I'm none of a Cocoa expert, but this patch (derived from an SO answer) works just right for me.
Thanks you for a patch, @remi6397
Have you checked other manual options other than automatic in preferences?
one of the option is to set dark mode depending on a Vim setting. This will be applied to a window, without touching the rest app windows
@eirnym
one of the option is to set dark mode depending on a Vim setting. This will be applied to a window, without touching the rest app windows
That was the one causing troubles. I could've just changed that setting and leave it as it is, but this all is more about not causing similar headaches to other users ;)
I'd realized that this fix prevents MacVim from building on ancient XCode versions, so I'll probably have to wrap it in conditionals, right?
I use this option as in some windows I have "background" option set to dark, in others, to light depending on a theme and project I do at the moment. When I see a light interface with dark window or dark interface with light window, it's a bit odd for me. Browser is the only exception from this rule as I have only one window visible on a screen, while I have usually 3-6 windows of MacVim while I'm working.
previously I used fixed theme variant for a window independent of macOS option to match my theme.
Following screenshots are for the reference
Sorry i haven’t looked at this PR yet. I’ll take a look later today.