mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-28 19:46:35 +00:00
update after refactor (string field config, etc)
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
const config = @import("config.zig");
|
||||
const x = @import("uucode.x.config");
|
||||
const config_x = @import("config.x.zig");
|
||||
const d = config.default;
|
||||
const wcwidth = config_x.wcwidth;
|
||||
|
||||
pub const tables = [_]config.Table{
|
||||
.{
|
||||
.extensions = &.{x.wcwidth},
|
||||
.extensions = &.{wcwidth},
|
||||
.fields = &.{
|
||||
x.wcwidth.field("wcwidth"),
|
||||
wcwidth.field("wcwidth"),
|
||||
d.field("general_category"),
|
||||
d.field("has_emoji_presentation"),
|
||||
d.field("block"),
|
||||
|
||||
@@ -150,7 +150,7 @@ pub fn getIndex(
|
||||
// we'll do this multiple times if we recurse, but this is a cached function
|
||||
// call higher up (GroupCache) so this should be rare.
|
||||
const p_mode: Collection.PresentationMode = if (p) |v| .{ .explicit = v } else .{
|
||||
.default = if (uucode.get("has_emoji_presentation", @intCast(cp)))
|
||||
.default = if (uucode.get(.has_emoji_presentation, @intCast(cp)))
|
||||
.emoji
|
||||
else
|
||||
.text,
|
||||
|
||||
@@ -7,6 +7,7 @@ const Allocator = std.mem.Allocator;
|
||||
const assert = std.debug.assert;
|
||||
const build_config = @import("../build_config.zig");
|
||||
const ziglyph = @import("ziglyph");
|
||||
const uucode = @import("uucode");
|
||||
const key = @import("key.zig");
|
||||
const KeyEvent = key.KeyEvent;
|
||||
|
||||
@@ -1574,7 +1575,7 @@ pub const Trigger = struct {
|
||||
/// in more codepoints so we need to use a 3 element array.
|
||||
fn foldedCodepoint(cp: u21) [3]u21 {
|
||||
// ASCII fast path
|
||||
if (ziglyph.letter.isAsciiLetter(cp)) {
|
||||
if (uucode.ascii.isAlphabetic(cp)) {
|
||||
return .{ ziglyph.letter.toLower(cp), 0, 0 };
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ pub const GraphemeBoundaryClass = enum(u4) {
|
||||
};
|
||||
|
||||
pub fn get(cp: u21) Properties {
|
||||
const wcwidth = if (cp < 0x110000) uucode.get("wcwidth", cp) else 0;
|
||||
const wcwidth = if (cp < 0x110000) uucode.get(.wcwidth, cp) else 0;
|
||||
|
||||
return .{
|
||||
.width = @intCast(@min(2, @max(0, wcwidth))),
|
||||
|
||||
Reference in New Issue
Block a user