refactor: BREAKING merge gutter_line_numbers and gutter_line_numbers_relative config options into an enum

This commit is contained in:
CJ van den Berg 2025-02-20 21:09:44 +01:00
parent ec3bba2aff
commit b9cc3936c8
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
4 changed files with 30 additions and 32 deletions

View file

@ -619,6 +619,13 @@ fn config_eql(comptime T: type, a: T, b: T) bool {
}
switch (@typeInfo(T)) {
.Bool, .Int, .Float, .Enum => return a == b,
.Optional => |info| {
if (a == null and b == null)
return true;
if (a == null or b == null)
return false;
return config_eql(info.child, a.?, b.?);
},
else => {},
}
@compileError("unsupported config type " ++ @typeName(T));