Skip to content

Commit

Permalink
Fix validation of cursor style, color scheme
Browse files Browse the repository at this point in the history
Fix #2331
  • Loading branch information
saagarjha committed Jan 21, 2024
1 parent 6def2de commit 7ac52f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/UserPreferences.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7ac52f6

Please sign in to comment.