mirror of
https://github.com/fairyglade/ly.git
synced 2026-08-06 21:21:58 +00:00
Prepare for Zig 0.17.0
Still requires Zig 0.16.x for now. Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -19,7 +19,7 @@ pub fn build(b: *std.Build) void {
|
||||
.optimize = optimize,
|
||||
.enable_x11_support = enable_x11_support,
|
||||
.fallback_uid_min = fallback_uid_min,
|
||||
.fallback_uid_max = fallback_uid_max
|
||||
.fallback_uid_max = fallback_uid_max,
|
||||
});
|
||||
mod.addImport("ly-core", ly_core.module("ly-core"));
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
.hash = "N-V-__8AAAUXBQD6Fwpi9m0MBqWXFFaqW5l1lVrJC2Ynj7a-",
|
||||
},
|
||||
.translate_c = .{
|
||||
.url = "git+https://codeberg.org/ziglang/translate-c#7a1a9fdc4ab00835748a6657ecbb835e3d5d45f7",
|
||||
.hash = "translate_c-0.0.0-Q_BUWvP1BgCjAk6PWv5286tOlvzD9-X-NkuTzh0KxY0Q",
|
||||
.url = "git+https://codeberg.org/ziglang/translate-c?ref=zig-0.16.x#6fe0ffc4549f15c5f2d9432c2b4460ba90ff85ac",
|
||||
.hash = "translate_c-1.0.0-Q_BUWo_5BgD4flHdUhA31zOz0XvZk9k7lQv1ouzyNXj2",
|
||||
},
|
||||
},
|
||||
.paths = .{
|
||||
|
||||
@@ -578,9 +578,9 @@ fn parseKeybind(self: *TerminalBuffer, io: std.Io, keybind: []const u8) !keyboar
|
||||
while (iterator.next()) |item| {
|
||||
var found = false;
|
||||
|
||||
inline for (std.meta.fields(keyboard.Key)) |field| {
|
||||
if (std.ascii.eqlIgnoreCase(field.name, item)) {
|
||||
@field(key, field.name) = true;
|
||||
inline for (comptime std.meta.fieldNames(keyboard.Key)) |name| {
|
||||
if (std.ascii.eqlIgnoreCase(name, item)) {
|
||||
@field(key, name) = true;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -113,14 +113,14 @@ pub const Key = packed struct {
|
||||
pub fn getEnabledPrintableAscii(self: Key) ?u8 {
|
||||
if (self.ctrl or self.alt) return null;
|
||||
|
||||
inline for (std.meta.fields(Key)) |field| {
|
||||
if (field.name.len == 1 and std.ascii.isPrint(field.name[0]) and @field(self, field.name)) {
|
||||
inline for (comptime std.meta.fieldNames(Key)) |name| {
|
||||
if (name.len == 1 and std.ascii.isPrint(name[0]) and @field(self, name)) {
|
||||
if (self.shift) {
|
||||
if (!std.ascii.isAlphanumeric(field.name[0])) return null;
|
||||
return std.ascii.toUpper(field.name[0]);
|
||||
if (!std.ascii.isAlphanumeric(name[0])) return null;
|
||||
return std.ascii.toUpper(name[0]);
|
||||
}
|
||||
|
||||
return field.name[0];
|
||||
return name[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user