Skip to content

Commit

Permalink
Merge pull request #2334 from saagarjha/master
Browse files Browse the repository at this point in the history
Fix validation of cursor style, color scheme
  • Loading branch information
tbodt authored Jan 21, 2024
2 parents 6def2de + 7ac52f6 commit 6eb320e
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 6eb320e

Please sign in to comment.