diff --git a/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift b/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift index c0aad46b3..39db13c6d 100644 --- a/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift +++ b/macos/Sources/Features/Terminal/Window Styles/TitlebarTabsVenturaTerminalWindow.swift @@ -5,7 +5,7 @@ class TitlebarTabsVenturaTerminalWindow: TerminalWindow { /// Titlebar tabs can't support the update accessory because of the way we layout /// the native tabs back into the menu bar. override var supportsUpdateAccessory: Bool { false } - + /// This is used to determine if certain elements should be drawn light or dark and should /// be updated whenever the window background color or surrounding elements changes. fileprivate var isLightTheme: Bool = false @@ -395,7 +395,7 @@ class TitlebarTabsVenturaTerminalWindow: TerminalWindow { // Hide the window drag handle. windowDragHandle?.isHidden = true - // Reenable the main toolbar title + // Re-enable the main toolbar title if let toolbar = toolbar as? TerminalToolbar { toolbar.titleIsHidden = false } diff --git a/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift b/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift index 57b889b82..a72436d7f 100644 --- a/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift +++ b/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift @@ -7,16 +7,16 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { /// This is necessary because various macOS operations (tab switching, tab bar /// visibility changes) can reset the titlebar appearance. private var lastSurfaceConfig: Ghostty.SurfaceView.DerivedConfig? - + /// KVO observation for tab group window changes. private var tabGroupWindowsObservation: NSKeyValueObservation? private var tabBarVisibleObservation: NSKeyValueObservation? - + deinit { tabGroupWindowsObservation?.invalidate() tabBarVisibleObservation?.invalidate() } - + // MARK: NSWindow override func awakeFromNib() { @@ -29,7 +29,7 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { override func becomeMain() { super.becomeMain() - + guard let lastSurfaceConfig else { return } syncAppearance(lastSurfaceConfig) @@ -42,7 +42,7 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { } } } - + override func update() { super.update() @@ -67,7 +67,7 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { // Save our config in case we need to reapply lastSurfaceConfig = surfaceConfig - // Everytime we change appearance, set KVO up again in case any of our + // Every time we change appearance, set KVO up again in case any of our // references changed (e.g. tabGroup is new). setupKVO() @@ -99,7 +99,7 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { ? NSColor.clear.cgColor : preferredBackgroundColor?.cgColor } - + // In all cases, we have to hide the background view since this has multiple subviews // that force a background color. titlebarBackgroundView?.isHidden = true @@ -108,14 +108,14 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { @available(macOS 13.0, *) private func syncAppearanceVentura(_ surfaceConfig: Ghostty.SurfaceView.DerivedConfig) { guard let titlebarContainer else { return } - + // Setup the titlebar background color to match ours titlebarContainer.wantsLayer = true titlebarContainer.layer?.backgroundColor = preferredBackgroundColor?.cgColor - + // See the docs for the function that sets this to true on why effectViewIsHidden = false - + // Necessary to not draw the border around the title titlebarAppearsTransparent = true } @@ -141,7 +141,7 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { // Remove existing observation if any tabGroupWindowsObservation?.invalidate() tabGroupWindowsObservation = nil - + // Check if tabGroup is available guard let tabGroup else { return } @@ -170,7 +170,7 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { // Remove existing observation if any tabBarVisibleObservation?.invalidate() tabBarVisibleObservation = nil - + // Set up KVO observation for isTabBarVisible tabBarVisibleObservation = tabGroup?.observe( \.isTabBarVisible, @@ -181,18 +181,18 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { self.syncAppearance(lastSurfaceConfig) } } - + // MARK: macOS 13 to 15 - + // We only need to set this once, but need to do it after the window has been created in order // to determine if the theme is using a very dark background, in which case we don't want to // remove the effect view if the default tab bar is being used since the effect created in // `updateTabsForVeryDarkBackgrounds` creates a confusing visual design. private var effectViewIsHidden = false - + private func hideEffectView() { guard !effectViewIsHidden else { return } - + // By hiding the visual effect view, we allow the window's (or titlebar's in this case) // background color to show through. If we were to set `titlebarAppearsTransparent` to true // the selected tab would look fine, but the unselected ones and new tab button backgrounds diff --git a/macos/Sources/Ghostty/Ghostty.Input.swift b/macos/Sources/Ghostty/Ghostty.Input.swift index 6b4eb0ae4..44011d5b9 100644 --- a/macos/Sources/Ghostty/Ghostty.Input.swift +++ b/macos/Sources/Ghostty/Ghostty.Input.swift @@ -68,7 +68,7 @@ extension Ghostty { if (flags.contains(.capsLock)) { mods |= GHOSTTY_MODS_CAPS.rawValue } // Handle sided input. We can't tell that both are pressed in the - // Ghostty structure but thats okay -- we don't use that information. + // Ghostty structure but that's okay -- we don't use that information. let rawFlags = flags.rawValue if (rawFlags & UInt(NX_DEVICERSHIFTKEYMASK) != 0) { mods |= GHOSTTY_MODS_SHIFT_RIGHT.rawValue } if (rawFlags & UInt(NX_DEVICERCTLKEYMASK) != 0) { mods |= GHOSTTY_MODS_CTRL_RIGHT.rawValue } @@ -139,7 +139,7 @@ extension Ghostty.Input { case GHOSTTY_ACTION_REPEAT: self.action = .repeat default: self.action = .press } - + // Convert key from keycode guard let key = Key(keyCode: UInt16(cValue.keycode)) else { return nil } self.key = key @@ -150,18 +150,18 @@ extension Ghostty.Input { } else { self.text = nil } - + // Set composing state self.composing = cValue.composing - + // Convert modifiers self.mods = Mods(cMods: cValue.mods) self.consumedMods = Mods(cMods: cValue.consumed_mods) - + // Set unshifted codepoint self.unshiftedCodepoint = cValue.unshifted_codepoint } - + /// Executes a closure with a temporary C representation of this KeyEvent. /// /// This method safely converts the Swift KeyEntity to a C `ghostty_input_key_s` struct @@ -180,7 +180,7 @@ extension Ghostty.Input { keyEvent.mods = mods.cMods keyEvent.consumed_mods = consumedMods.cMods keyEvent.unshifted_codepoint = unshiftedCodepoint - + // Handle text with proper memory management if let text = text { return text.withCString { textPtr in @@ -203,7 +203,7 @@ extension Ghostty.Input { case release case press case `repeat` - + var cAction: ghostty_input_action_e { switch self { case .release: GHOSTTY_ACTION_RELEASE @@ -232,7 +232,7 @@ extension Ghostty.Input { let action: MouseState let button: MouseButton let mods: Mods - + init( action: MouseState, button: MouseButton, @@ -242,7 +242,7 @@ extension Ghostty.Input { self.button = button self.mods = mods } - + /// Creates a MouseEvent from C enum values. /// /// This initializer converts C-style mouse input enums to Swift types. @@ -259,7 +259,7 @@ extension Ghostty.Input { case GHOSTTY_MOUSE_PRESS: self.action = .press default: return nil } - + // Convert button switch button { case GHOSTTY_MOUSE_UNKNOWN: self.button = .unknown @@ -268,7 +268,7 @@ extension Ghostty.Input { case GHOSTTY_MOUSE_MIDDLE: self.button = .middle default: return nil } - + // Convert modifiers self.mods = Mods(cMods: mods) } @@ -279,7 +279,7 @@ extension Ghostty.Input { let x: Double let y: Double let mods: Mods - + init( x: Double, y: Double, @@ -316,7 +316,7 @@ extension Ghostty.Input { enum MouseState: String, CaseIterable { case release case press - + var cMouseState: ghostty_input_mouse_state_e { switch self { case .release: GHOSTTY_MOUSE_RELEASE @@ -344,7 +344,7 @@ extension Ghostty.Input { case left case right case middle - + var cMouseButton: ghostty_input_mouse_button_e { switch self { case .unknown: GHOSTTY_MOUSE_UNKNOWN @@ -382,18 +382,18 @@ extension Ghostty.Input { /// for scroll events, matching the Zig `ScrollMods` packed struct. struct ScrollMods { let rawValue: Int32 - + /// True if this is a high-precision scroll event (e.g., trackpad, Magic Mouse) var precision: Bool { rawValue & 0b0000_0001 != 0 } - + /// The momentum phase of the scroll event for inertial scrolling var momentum: Momentum { let momentumBits = (rawValue >> 1) & 0b0000_0111 return Momentum(rawValue: UInt8(momentumBits)) ?? .none } - + init(precision: Bool = false, momentum: Momentum = .none) { var value: Int32 = 0 if precision { @@ -402,11 +402,11 @@ extension Ghostty.Input { value |= Int32(momentum.rawValue) << 1 self.rawValue = value } - + init(rawValue: Int32) { self.rawValue = rawValue } - + var cScrollMods: ghostty_input_scroll_mods_t { rawValue } @@ -425,7 +425,7 @@ extension Ghostty.Input { case ended = 4 case cancelled = 5 case mayBegin = 6 - + var cMomentum: ghostty_input_mouse_momentum_e { switch self { case .none: GHOSTTY_MOUSE_MOMENTUM_NONE @@ -442,7 +442,7 @@ extension Ghostty.Input { extension Ghostty.Input.Momentum: AppEnum { static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Scroll Momentum") - + static var caseDisplayRepresentations: [Ghostty.Input.Momentum : DisplayRepresentation] = [ .none: "None", .began: "Began", @@ -479,7 +479,7 @@ extension Ghostty.Input { /// `ghostty_input_mods_e` struct Mods: OptionSet { let rawValue: UInt32 - + static let none = Mods(rawValue: GHOSTTY_MODS_NONE.rawValue) static let shift = Mods(rawValue: GHOSTTY_MODS_SHIFT.rawValue) static let ctrl = Mods(rawValue: GHOSTTY_MODS_CTRL.rawValue) @@ -490,23 +490,23 @@ extension Ghostty.Input { static let ctrlRight = Mods(rawValue: GHOSTTY_MODS_CTRL_RIGHT.rawValue) static let altRight = Mods(rawValue: GHOSTTY_MODS_ALT_RIGHT.rawValue) static let superRight = Mods(rawValue: GHOSTTY_MODS_SUPER_RIGHT.rawValue) - + var cMods: ghostty_input_mods_e { ghostty_input_mods_e(rawValue) } - + init(rawValue: UInt32) { self.rawValue = rawValue } - + init(cMods: ghostty_input_mods_e) { self.rawValue = cMods.rawValue } - + init(nsFlags: NSEvent.ModifierFlags) { self.init(cMods: Ghostty.ghosttyMods(nsFlags)) } - + var nsFlags: NSEvent.ModifierFlags { Ghostty.eventModifierFlags(mods: cMods) } @@ -1120,43 +1120,43 @@ extension Ghostty.Input.Key: AppEnum { return [ // Letters (A-Z) .a, .b, .c, .d, .e, .f, .g, .h, .i, .j, .k, .l, .m, .n, .o, .p, .q, .r, .s, .t, .u, .v, .w, .x, .y, .z, - + // Numbers (0-9) .digit0, .digit1, .digit2, .digit3, .digit4, .digit5, .digit6, .digit7, .digit8, .digit9, - + // Common Control Keys .space, .enter, .tab, .backspace, .escape, .delete, - + // Arrow Keys .arrowUp, .arrowDown, .arrowLeft, .arrowRight, - + // Navigation Keys .home, .end, .pageUp, .pageDown, .insert, - + // Function Keys (F1-F20) .f1, .f2, .f3, .f4, .f5, .f6, .f7, .f8, .f9, .f10, .f11, .f12, .f13, .f14, .f15, .f16, .f17, .f18, .f19, .f20, - + // Modifier Keys .shiftLeft, .shiftRight, .controlLeft, .controlRight, .altLeft, .altRight, .metaLeft, .metaRight, .capsLock, - + // Punctuation & Symbols .minus, .equal, .backquote, .bracketLeft, .bracketRight, .backslash, .semicolon, .quote, .comma, .period, .slash, - + // Numpad .numLock, .numpad0, .numpad1, .numpad2, .numpad3, .numpad4, .numpad5, .numpad6, .numpad7, .numpad8, .numpad9, .numpadAdd, .numpadSubtract, .numpadMultiply, .numpadDivide, .numpadDecimal, .numpadEqual, .numpadEnter, .numpadComma, - + // Media Keys .audioVolumeUp, .audioVolumeDown, .audioVolumeMute, - + // International Keys .intlBackslash, .intlRo, .intlYen, - + // Other .contextMenu ] @@ -1167,11 +1167,11 @@ extension Ghostty.Input.Key: AppEnum { .a: "A", .b: "B", .c: "C", .d: "D", .e: "E", .f: "F", .g: "G", .h: "H", .i: "I", .j: "J", .k: "K", .l: "L", .m: "M", .n: "N", .o: "O", .p: "P", .q: "Q", .r: "R", .s: "S", .t: "T", .u: "U", .v: "V", .w: "W", .x: "X", .y: "Y", .z: "Z", - + // Numbers (0-9) .digit0: "0", .digit1: "1", .digit2: "2", .digit3: "3", .digit4: "4", .digit5: "5", .digit6: "6", .digit7: "7", .digit8: "8", .digit9: "9", - + // Common Control Keys .space: "Space", .enter: "Enter", @@ -1179,26 +1179,26 @@ extension Ghostty.Input.Key: AppEnum { .backspace: "Backspace", .escape: "Escape", .delete: "Delete", - + // Arrow Keys .arrowUp: "Up Arrow", .arrowDown: "Down Arrow", .arrowLeft: "Left Arrow", .arrowRight: "Right Arrow", - + // Navigation Keys .home: "Home", .end: "End", .pageUp: "Page Up", .pageDown: "Page Down", .insert: "Insert", - + // Function Keys (F1-F20) .f1: "F1", .f2: "F2", .f3: "F3", .f4: "F4", .f5: "F5", .f6: "F6", .f7: "F7", .f8: "F8", .f9: "F9", .f10: "F10", .f11: "F11", .f12: "F12", .f13: "F13", .f14: "F14", .f15: "F15", .f16: "F16", .f17: "F17", .f18: "F18", .f19: "F19", .f20: "F20", - + // Modifier Keys .shiftLeft: "Left Shift", .shiftRight: "Right Shift", @@ -1209,7 +1209,7 @@ extension Ghostty.Input.Key: AppEnum { .metaLeft: "Left Command", .metaRight: "Right Command", .capsLock: "Caps Lock", - + // Punctuation & Symbols .minus: "Minus (-)", .equal: "Equal (=)", @@ -1222,7 +1222,7 @@ extension Ghostty.Input.Key: AppEnum { .comma: "Comma (,)", .period: "Period (.)", .slash: "Slash (/)", - + // Numpad .numLock: "Num Lock", .numpad0: "Numpad 0", .numpad1: "Numpad 1", .numpad2: "Numpad 2", @@ -1236,17 +1236,17 @@ extension Ghostty.Input.Key: AppEnum { .numpadEqual: "Numpad Equal", .numpadEnter: "Numpad Enter", .numpadComma: "Numpad Comma", - + // Media Keys .audioVolumeUp: "Volume Up", .audioVolumeDown: "Volume Down", .audioVolumeMute: "Volume Mute", - + // International Keys .intlBackslash: "International Backslash", .intlRo: "International Ro", .intlYen: "International Yen", - + // Other .contextMenu: "Context Menu" ] diff --git a/macos/Sources/Helpers/Fullscreen.swift b/macos/Sources/Helpers/Fullscreen.swift index 78c967661..8ab476267 100644 --- a/macos/Sources/Helpers/Fullscreen.swift +++ b/macos/Sources/Helpers/Fullscreen.swift @@ -130,7 +130,7 @@ class NativeFullscreen: FullscreenBase, FullscreenStyle { class NonNativeFullscreen: FullscreenBase, FullscreenStyle { var fullscreenMode: FullscreenMode { .nonNative } - + // Non-native fullscreen never supports tabs because tabs require // the "titled" style and we don't have it for non-native fullscreen. var supportsTabs: Bool { false } @@ -223,7 +223,7 @@ class NonNativeFullscreen: FullscreenBase, FullscreenStyle { // Being untitled let's our content take up the full frame. window.styleMask.remove(.titled) - // We dont' want the non-native fullscreen window to be resizable + // We don't want the non-native fullscreen window to be resizable // from the edges. window.styleMask.remove(.resizable) @@ -277,7 +277,7 @@ class NonNativeFullscreen: FullscreenBase, FullscreenStyle { if let window = window as? TerminalWindow, window.isTabBar(c) { continue } - + if window.titlebarAccessoryViewControllers.firstIndex(of: c) == nil { window.addTitlebarAccessoryViewController(c) } @@ -286,7 +286,7 @@ class NonNativeFullscreen: FullscreenBase, FullscreenStyle { // Removing "titled" also clears our toolbar window.toolbar = savedState.toolbar window.toolbarStyle = savedState.toolbarStyle - + // If the window was previously in a tab group that isn't empty now, // we re-add it. We have to do this because our process of doing non-native // fullscreen removes the window from the tab group. @@ -412,7 +412,7 @@ class NonNativeFullscreen: FullscreenBase, FullscreenStyle { self.toolbar = window.toolbar self.toolbarStyle = window.toolbarStyle self.dock = window.screen?.hasDock ?? false - + self.titlebarAccessoryViewControllers = if (window.hasTitleBar) { // Accessing titlebarAccessoryViewControllers without a titlebar triggers a crash. window.titlebarAccessoryViewControllers diff --git a/src/Surface.zig b/src/Surface.zig index fd658a43b..c9223d0ad 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -1222,7 +1222,7 @@ fn childExited(self: *Surface, info: apprt.surface.Message.ChildExited) void { break :gui false; }) return; - // If a native GUI notification was not showm. update our terminal to + // If a native GUI notification was not shown, update our terminal to // note the abnormal exit. self.childExitedAbnormally(info) catch |err| { log.err("error handling abnormal child exit err={}", .{err}); @@ -1232,7 +1232,7 @@ fn childExited(self: *Surface, info: apprt.surface.Message.ChildExited) void { return; } - // We output a message so that the user knows whats going on and + // We output a message so that the user knows what's going on and // doesn't think their terminal just froze. We show this unconditionally // on close even if `wait_after_command` is false and the surface closes // immediately because if a user does an `undo` to restore a closed diff --git a/src/config/theme.zig b/src/config/theme.zig index 7ba6e5885..8776fb1bf 100644 --- a/src/config/theme.zig +++ b/src/config/theme.zig @@ -221,7 +221,7 @@ pub fn open( // Unlikely scenario: the theme doesn't exist. In this case, we reset // our iterator, reiterate over in order to build a better error message. - // This does double allocate some memory but for errors I think thats + // This does double allocate some memory but for errors I think that's // fine. it.reset(); while (try it.next()) |loc| { diff --git a/src/font/Atlas.zig b/src/font/Atlas.zig index 0648c0edf..7dcff8416 100644 --- a/src/font/Atlas.zig +++ b/src/font/Atlas.zig @@ -562,7 +562,7 @@ test "exact fit" { try testing.expectError(Error.AtlasFull, atlas.reserve(alloc, 1, 1)); } -test "doesnt fit" { +test "doesn't fit" { const alloc = testing.allocator; var atlas = try init(alloc, 32, .grayscale); defer atlas.deinit(alloc); diff --git a/src/font/shaper/coretext.zig b/src/font/shaper/coretext.zig index 6b01d79aa..17d7801ff 100644 --- a/src/font/shaper/coretext.zig +++ b/src/font/shaper/coretext.zig @@ -52,7 +52,7 @@ pub const Shaper = struct { /// Cached attributes dict for creating CTTypesetter objects. /// The values in this never change so we can avoid overhead - /// by just creating it once and saving it for re-use. + /// by just creating it once and saving it for reuse. typesetter_attr_dict: *macos.foundation.Dictionary, /// List where we cache fonts, so we don't have to remake them for diff --git a/src/font/sprite/Face.zig b/src/font/sprite/Face.zig index 94bfa2f0b..596a92044 100644 --- a/src/font/sprite/Face.zig +++ b/src/font/sprite/Face.zig @@ -405,7 +405,7 @@ fn testDrawRanges( const padding_x = width / 4; const padding_y = height / 4; - // Canvas to draw glyphs on, we'll re-use this for all glyphs. + // Canvas to draw glyphs on, we'll reuse this for all glyphs. var canvas = try font.sprite.Canvas.init( alloc, width, diff --git a/src/input/Binding.zig b/src/input/Binding.zig index 83c6ef38f..e7507b112 100644 --- a/src/input/Binding.zig +++ b/src/input/Binding.zig @@ -2020,7 +2020,7 @@ pub const Set = struct { /// /// `buffer_stream` is a FixedBufferStream used for temporary storage /// that is shared between calls to nested levels of the set. - /// For example, 'a>b>c=x' and 'a>b>d=y' will re-use the 'a>b' written + /// For example, 'a>b>c=x' and 'a>b>d=y' will reuse the 'a>b' written /// to the buffer before flushing it to the formatter with 'c=x' and 'd=y'. pub fn formatEntries( self: Value, diff --git a/src/input/key_encode.zig b/src/input/key_encode.zig index 736df58a0..3716c226e 100644 --- a/src/input/key_encode.zig +++ b/src/input/key_encode.zig @@ -153,7 +153,7 @@ fn kitty( // IME confirmation still sends an enter key so if we have enter // and UTF8 text we just send it directly since we assume that is - // whats happening. See legacy()'s similar logic for more details + // what's happening. See legacy()'s similar logic for more details // on how to verify this. if (event.utf8.len > 0) utf8: { switch (event.key) { diff --git a/src/input/mouse.zig b/src/input/mouse.zig index 2be2b9a26..bdf967ed2 100644 --- a/src/input/mouse.zig +++ b/src/input/mouse.zig @@ -10,7 +10,7 @@ pub const ButtonState = enum(c_int) { press, }; -/// Possible mouse buttons. We only track up to 11 because thats the maximum +/// Possible mouse buttons. We only track up to 11 because that's the maximum /// button input that terminal mouse tracking handles without becoming /// ambiguous. /// diff --git a/src/inspector/Inspector.zig b/src/inspector/Inspector.zig index 86a7b473c..dc498b58d 100644 --- a/src/inspector/Inspector.zig +++ b/src/inspector/Inspector.zig @@ -1213,7 +1213,7 @@ fn renderTermioWindow(self: *Inspector) void { cimgui.c.igText("%s", ev.str.ptr); // If the event is selected, we render info about it. For now - // we put this in the last column because thats the widest and + // we put this in the last column because that's the widest and // imgui has no way to make a column span. if (ev.imgui_selected) { { diff --git a/src/renderer/generic.zig b/src/renderer/generic.zig index 39eec7b43..4ebe501f7 100644 --- a/src/renderer/generic.zig +++ b/src/renderer/generic.zig @@ -2099,7 +2099,7 @@ pub fn Renderer(comptime GraphicsAPI: type) type { } // We also need to reset the shaper cache so shaper info - // from the previous font isn't re-used for the new font. + // from the previous font isn't reused for the new font. const font_shaper_cache = font.ShaperCache.init(); self.font_shaper_cache.deinit(self.alloc); self.font_shaper_cache = font_shaper_cache; diff --git a/src/terminal/Terminal.zig b/src/terminal/Terminal.zig index 6c9d8b585..8bb167cd1 100644 --- a/src/terminal/Terminal.zig +++ b/src/terminal/Terminal.zig @@ -675,7 +675,7 @@ fn printCell( // TODO: this case was not handled in the old terminal implementation // but it feels like we should do something. investigate other - // terminals (xterm mainly) and see whats up. + // terminals (xterm mainly) and see what's up. .spacer_head => {}, } } diff --git a/src/terminal/kitty/graphics_unicode.zig b/src/terminal/kitty/graphics_unicode.zig index ceadf63ee..a223797ba 100644 --- a/src/terminal/kitty/graphics_unicode.zig +++ b/src/terminal/kitty/graphics_unicode.zig @@ -256,7 +256,7 @@ pub const Placement = struct { if (img_scale_source.y < img_scaled.y_offset) { // If our source rect y is within the offset area, we need to // adjust our source rect and destination since the source texture - // doesnt actually have the offset area blank. + // doesn't actually have the offset area blank. const offset: f64 = img_scaled.y_offset - img_scale_source.y; img_scale_source.height -= offset; y_offset = offset; @@ -286,7 +286,7 @@ pub const Placement = struct { if (img_scale_source.x < img_scaled.x_offset) { // If our source rect x is within the offset area, we need to // adjust our source rect and destination since the source texture - // doesnt actually have the offset area blank. + // doesn't actually have the offset area blank. const offset: f64 = img_scaled.x_offset - img_scale_source.x; img_scale_source.width -= offset; x_offset = offset; diff --git a/src/terminal/ref_counted_set.zig b/src/terminal/ref_counted_set.zig index e67682ff5..883dd2f0d 100644 --- a/src/terminal/ref_counted_set.zig +++ b/src/terminal/ref_counted_set.zig @@ -215,7 +215,7 @@ pub fn RefCountedSet( OutOfMemory, /// The set needs to be rehashed, as there are many dead - /// items with lower IDs which are inaccessible for re-use. + /// items with lower IDs which are inaccessible for reuse. NeedsRehash, }; @@ -437,7 +437,7 @@ pub fn RefCountedSet( } /// Delete an item, removing any references from - /// the table, and freeing its ID to be re-used. + /// the table, and freeing its ID to be reused. fn deleteItem(self: *Self, base: anytype, id: Id, ctx: Context) void { const table = self.table.ptr(base); const items = self.items.ptr(base); @@ -585,7 +585,7 @@ pub fn RefCountedSet( const item = &items[id]; // If there's a dead item then we resurrect it - // for our value so that we can re-use its ID, + // for our value so that we can reuse its ID, // unless its ID is greater than the one we're // given (i.e. prefer smaller IDs). if (item.meta.ref == 0) { @@ -645,7 +645,7 @@ pub fn RefCountedSet( } // Our chosen ID may have changed if we decided - // to re-use a dead item's ID, so we make sure + // to reuse a dead item's ID, so we make sure // the chosen bucket contains the correct ID. table[new_item.meta.bucket] = chosen_id; diff --git a/src/terminal/tmux/viewer.zig b/src/terminal/tmux/viewer.zig index 0fcaaf207..62a0f1d00 100644 --- a/src/terminal/tmux/viewer.zig +++ b/src/terminal/tmux/viewer.zig @@ -208,7 +208,7 @@ pub const Viewer = struct { /// caller is responsible for diffing the new window list against /// the prior one. Remember that for a given Viewer, window IDs /// are guaranteed to be stable. Additionally, tmux (as of Dec 2025) - /// never re-uses window IDs within a server process lifetime. + /// never reuses window IDs within a server process lifetime. windows: []const Window, pub fn format(self: Action, writer: *std.Io.Writer) !void {