@@ -198,6 +198,7 @@ - (void)handleFindReplace:(NSDictionary *)args;
198198- (void )useSelectionForFind ;
199199- (void )handleMarkedText : (NSData *)data ;
200200- (void )handleGesture : (NSData *)data ;
201+ - (void )handleOSAppearanceChange : (NSData *)data ;
201202#ifdef FEAT_BEVAL
202203- (void )bevalCallback : (id )sender ;
203204#endif
@@ -2110,6 +2111,8 @@ - (void)handleInputEvent:(int)msgid data:(NSData *)data
21102111 ASLogDebug (@" SetWindowPositionMsgID: x=%d y=%d " , winposX, winposY);
21112112 } else if (GestureMsgID == msgid) {
21122113 [self handleGesture: data];
2114+ } else if (NotifyAppearanceChangeMsgID == msgid) {
2115+ [self handleOSAppearanceChange: data];
21132116 } else if (ActivatedImMsgID == msgid) {
21142117 [self setImState: YES ];
21152118 } else if (DeactivatedImMsgID == msgid) {
@@ -3326,6 +3329,17 @@ - (void)handleGesture:(NSData *)data
33263329 }
33273330}
33283331
3332+ - (void )handleOSAppearanceChange : (NSData *)data {
3333+ const void *bytes = [data bytes ];
3334+ int flag = *((int *)bytes); bytes += sizeof (int );
3335+ // 0 : (default) The standard (light) system appearance.
3336+ // 1 : The standard dark system appearance.
3337+ // 2 : The high-contrast version of the standard light system appearance.
3338+ // 3 : The high-contrast version of the standard dark system appearance.
3339+ set_vim_var_nr (VV_OS_APPEARANCE, flag);
3340+ apply_autocmds (EVENT_OSAPPCHANGED, NULL , NULL , FALSE , curbuf);
3341+ }
3342+
33293343#ifdef FEAT_BEVAL
33303344- (void )bevalCallback : (id )sender
33313345{
0 commit comments