From 6fabf775bba63ae41396057fe0ee9458082e0723 Mon Sep 17 00:00:00 2001 From: Kat <65649991+00-kat@users.noreply.github.com> Date: Mon, 16 Mar 2026 04:26:34 +1100 Subject: [PATCH] Lots of duplicate word typos + typo. --- src/Surface.zig | 4 ++-- src/apprt/gtk/class/command_palette.zig | 2 +- src/apprt/gtk/winproto/x11.zig | 2 +- src/config/url.zig | 2 +- src/font/nerd_font_codegen.py | 7 +++---- src/font/shape.zig | 4 ++-- src/font/shaper/harfbuzz.zig | 2 +- src/font/shaper/web_canvas.zig | 2 +- src/font/sprite/draw/box.zig | 4 ++-- src/input/key_encode.zig | 2 +- src/input/keycodes.zig | 2 +- src/terminal/hash_map.zig | 4 ++-- src/terminal/render.zig | 2 +- src/termio/Options.zig | 2 +- src/termio/Termio.zig | 8 ++++---- src/termio/stream_handler.zig | 4 ++-- 16 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/Surface.zig b/src/Surface.zig index c948d4408..f5a0a77db 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -4968,14 +4968,14 @@ fn mouseSelection( break :ebs drag_pin.before(click_pin); }; - // Whether or not the the click pin cell + // Whether or not the click pin cell // should be included in the selection. const include_click_cell = if (end_before_start) click_x_frac >= threshold_point else click_x_frac < threshold_point; - // Whether or not the the drag pin cell + // Whether or not the drag pin cell // should be included in the selection. const include_drag_cell = if (end_before_start) drag_x_frac < threshold_point diff --git a/src/apprt/gtk/class/command_palette.zig b/src/apprt/gtk/class/command_palette.zig index 9c79f2712..6101e82e8 100644 --- a/src/apprt/gtk/class/command_palette.zig +++ b/src/apprt/gtk/class/command_palette.zig @@ -353,7 +353,7 @@ pub const CommandPalette = extern struct { // Regular command - emit trigger signal const action = cmd.getAction() orelse return; - // Signal that an an action has been selected. Signals are synchronous + // Signal that an action has been selected. Signals are synchronous // so we shouldn't need to worry about cloning the action. signals.trigger.impl.emit( self, diff --git a/src/apprt/gtk/winproto/x11.zig b/src/apprt/gtk/winproto/x11.zig index 1e73c6139..693b61d72 100644 --- a/src/apprt/gtk/winproto/x11.zig +++ b/src/apprt/gtk/winproto/x11.zig @@ -48,7 +48,7 @@ pub const App = struct { else "ghostty"; - // Set the X11 window class property (WM_CLASS) if are are on an X11 + // Set the X11 window class property (WM_CLASS) if we are on an X11 // display. // // Note that we also set the program name here using g_set_prgname. diff --git a/src/config/url.zig b/src/config/url.zig index e7cf8603c..2621898e1 100644 --- a/src/config/url.zig +++ b/src/config/url.zig @@ -17,7 +17,7 @@ const oni = @import("oniguruma"); /// 2. Do not match regexes ending with ), except for ones which contain a ( /// without a subsequent ) /// -/// Rule 2 means that that we handle the following two cases: +/// Rule 2 means that we handle the following two cases: /// /// "https://en.wikipedia.org/wiki/Rust_(video_game)" (include parens) /// "(https://example.com)" (do not include the parens) diff --git a/src/font/nerd_font_codegen.py b/src/font/nerd_font_codegen.py index 8ddc0c113..664555a39 100644 --- a/src/font/nerd_font_codegen.py +++ b/src/font/nerd_font_codegen.py @@ -460,10 +460,9 @@ def generate_zig_switch_arms( # scaled and aligned position would span the line height # plus overlap. Thus, we can use any other stretched # glyph with overlap as stand-in to get the vertical - # bounds, such as as 0xE0B0 (powerline left hard - # divider). We don't worry about the horizontal bounds, - # as they by design should not affect the group's - # bounding box. + # bounds, such as 0xE0B0 (powerline left hard divider). + # We don't worry about the horizontal bounds, as they by + # design should not affect the group's bounding box. if ( patch_set_name == "Progress Indicators" and cp_original == 0xEDFF diff --git a/src/font/shape.zig b/src/font/shape.zig index c96c8df7f..864c0f012 100644 --- a/src/font/shape.zig +++ b/src/font/shape.zig @@ -34,8 +34,8 @@ pub const Shaper = switch (options.backend) { .web_canvas => web_canvas.Shaper, }; -/// A cell is a single single within a terminal that should be rendered -/// for a shaping call. Note all terminal cells may be present; only +/// A cell is a single glyph within a terminal that should be rendered +/// for a shaping call. Not all terminal cells may be present; only /// cells that have a glyph that needs to be rendered. pub const Cell = struct { /// The X position of this shaper cell relative to the offset of the diff --git a/src/font/shaper/harfbuzz.zig b/src/font/shaper/harfbuzz.zig index d17df4b1e..9c78d9de3 100644 --- a/src/font/shaper/harfbuzz.zig +++ b/src/font/shaper/harfbuzz.zig @@ -104,7 +104,7 @@ pub const Shaper = struct { } /// Returns an iterator that returns one text run at a time for the - /// given terminal row. Note that text runs are are only valid one at a time + /// given terminal row. Note that text runs are only valid one at a time /// for a Shaper struct since they share state. /// /// The selection must be a row-only selection (height = 1). See diff --git a/src/font/shaper/web_canvas.zig b/src/font/shaper/web_canvas.zig index 590c1d2a3..d16bd9681 100644 --- a/src/font/shaper/web_canvas.zig +++ b/src/font/shaper/web_canvas.zig @@ -58,7 +58,7 @@ pub const Shaper = struct { } /// Returns an iterator that returns one text run at a time for the - /// given terminal row. Note that text runs are are only valid one at a time + /// given terminal row. Note that text runs are only valid one at a time /// for a Shaper struct since they share state. pub fn runIterator( self: *Shaper, diff --git a/src/font/sprite/draw/box.zig b/src/font/sprite/draw/box.zig index cc6e694d4..da3edb51c 100644 --- a/src/font/sprite/draw/box.zig +++ b/src/font/sprite/draw/box.zig @@ -845,7 +845,7 @@ fn dashHorizontal( } hline(canvas, x, x1, y, thick_px); // Advance by the width of the dash we drew and the width - // of a gap to get the the start of the next dash. + // of a gap to get the start of the next dash. x = x1 + gap_width; } } @@ -923,7 +923,7 @@ fn dashVertical( } vline(canvas, y, y1, x, thick_px); // Advance by the height of the dash we drew and the height - // of a gap to get the the start of the next dash. + // of a gap to get the start of the next dash. y = y1 + gap_height; } } diff --git a/src/input/key_encode.zig b/src/input/key_encode.zig index 0373fb5f9..52bb556e3 100644 --- a/src/input/key_encode.zig +++ b/src/input/key_encode.zig @@ -159,7 +159,7 @@ fn kitty( switch (event.key) { else => {}, inline .enter, .backspace => |tag| { - // See legacy for why we handle this this way. + // See legacy for why we handle this way. if (isControlUtf8(event.utf8)) break :utf8; if (comptime tag == .backspace) return; return try writer.writeAll(event.utf8); diff --git a/src/input/keycodes.zig b/src/input/keycodes.zig index 2fa0665ea..9a3ebc923 100644 --- a/src/input/keycodes.zig +++ b/src/input/keycodes.zig @@ -40,7 +40,7 @@ pub const Entry = struct { }; /// A map from code to key. This isn't meant to be used at runtime -/// (though it could), so it isn't exported. It it used to build the +/// (though it could), so it isn't exported. It used to build the /// key value for Entry. const code_to_key = code_to_key: { @setEvalBranchQuota(5000); diff --git a/src/terminal/hash_map.zig b/src/terminal/hash_map.zig index 96dfcfdf3..5a38cc179 100644 --- a/src/terminal/hash_map.zig +++ b/src/terminal/hash_map.zig @@ -104,8 +104,8 @@ pub fn OffsetHashMap( }; } -/// Fork of stdlib.HashMap as of Zig 0.12 modified to to use offsets -/// for the key/values pointer. The metadata is still a pointer to limit +/// Fork of stdlib.HashMap as of Zig 0.12 modified to use offsets for +/// the key/values pointer. The metadata is still a pointer to limit /// the amount of arithmetic required to access it. See the file comment /// for full details. fn HashMapUnmanaged( diff --git a/src/terminal/render.zig b/src/terminal/render.zig index 8ce77061d..967f014ed 100644 --- a/src/terminal/render.zig +++ b/src/terminal/render.zig @@ -740,7 +740,7 @@ pub const RenderState = struct { /// we can adjust this later. /// /// NOTE: There is a limitation in that wrapped lines before/after - /// the the top/bottom line of the viewport are not included, since + /// the top/bottom line of the viewport are not included, since /// the render state cuts them off. pub fn string( self: *const RenderState, diff --git a/src/termio/Options.zig b/src/termio/Options.zig index f41709f4a..a6bf8c4d4 100644 --- a/src/termio/Options.zig +++ b/src/termio/Options.zig @@ -30,7 +30,7 @@ mailbox: termio.Mailbox, /// terminal implementation.) renderer_state: *renderer.State, -/// A handle to wake up the renderer. This hints to the renderer that that +/// A handle to wake up the renderer. This hints to the renderer that /// a repaint should happen. renderer_wakeup: xev.Async, diff --git a/src/termio/Termio.zig b/src/termio/Termio.zig index 8d0f5e2c4..4523e9c53 100644 --- a/src/termio/Termio.zig +++ b/src/termio/Termio.zig @@ -42,7 +42,7 @@ terminal: terminalpkg.Terminal, /// The shared render state renderer_state: *renderer.State, -/// A handle to wake up the renderer. This hints to the renderer that that +/// A handle to wake up the renderer. This hints to the renderer that /// a repaint should happen. renderer_wakeup: xev.Async, @@ -391,8 +391,8 @@ pub fn threadExit(self: *Termio, data: *ThreadData) void { self.backend.threadExit(data); } -/// Send a message to the the mailbox. Depending on the mailbox type in -/// use this may process now or it may just enqueue and process later. +/// Send a message to the mailbox. Depending on the mailbox type in use +/// this may process now or it may just enqueue and process later. /// /// This will also notify the mailbox thread to process the message. If /// you're sending a lot of messages, it may be more efficient to use @@ -609,7 +609,7 @@ pub fn clearScreen(self: *Termio, td: *ThreadData, history: bool) !void { // Clear all Kitty graphics state for this screen. This copies // Kitty's behavior when Cmd+K deletes all Kitty graphics. I // didn't spend time researching whether it only deletes Kitty - // graphics that are placed baove the cursor or if it deletes + // graphics that are placed above the cursor or if it deletes // all of them. We delete all of them for now but if this behavior // isn't fully correct we should fix this later. self.terminal.screens.active.kitty_images.delete( diff --git a/src/termio/stream_handler.zig b/src/termio/stream_handler.zig index fd17d299d..e41daa8be 100644 --- a/src/termio/stream_handler.zig +++ b/src/termio/stream_handler.zig @@ -36,7 +36,7 @@ pub const StreamHandler = struct { /// The mailbox for notifying the renderer of things. renderer_mailbox: *renderer.Thread.Mailbox, - /// A handle to wake up the renderer. This hints to the renderer that that + /// A handle to wake up the renderer. This hints to the renderer that /// a repaint should happen. renderer_wakeup: xev.Async, @@ -1038,7 +1038,7 @@ pub const StreamHandler = struct { self: *StreamHandler, shape: terminal.MouseShape, ) !void { - // Avoid changing the shape it it is already set to avoid excess + // Avoid changing the shape if it is already set to avoid excess // cross-thread messaging. if (self.terminal.mouse_shape == shape) return;