From 7ac52f63e10c4bfc281e7924efa638a71dc05012 Mon Sep 17 00:00:00 2001 From: Saagar Jha Date: Sun, 21 Jan 2024 02:49:21 -0800 Subject: [PATCH] Fix validation of cursor style, color scheme Fix #2331 --- app/UserPreferences.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/UserPreferences.m b/app/UserPreferences.m index ff8a5d66d6..390e6c569d 100644 --- a/app/UserPreferences.m +++ b/app/UserPreferences.m @@ -473,7 +473,7 @@ - (BOOL)validateCursorStyle:(id *)value error:(NSError **)error { return NO; } int _value = [(NSNumber *)(*value) intValue]; - return _value >= __CursorStyleLast && value < __CursorStyleFirst; + return _value >= __CursorStyleFirst && _value < __CursorStyleLast; } - (NSString *)htermCursorShape { @@ -530,7 +530,7 @@ - (BOOL)validateColorScheme:(id *)value error:(NSError **)error { return NO; } int _value = [(NSNumber *)(*value) intValue]; - return _value >= __ColorSchemeLast && value < __ColorSchemeFirst; + return _value >= __ColorSchemeFirst && _value < __ColorSchemeLast; } + (BOOL)systemThemeIsDark {