From 6459e5c8cac4a5d5f2d6274139c3d199715e1fca Mon Sep 17 00:00:00 2001
From: Peter Cock
Date: Fri, 3 Jan 2025 19:00:45 +0000
Subject: [PATCH] Fixing a few typos in the source code comments (#4529)
---
src/apprt/gtk/App.zig | 2 +-
src/apprt/gtk/key.zig | 2 +-
src/config/Config.zig | 2 +-
src/input/key.zig | 4 ++--
src/inspector/termio.zig | 2 +-
src/renderer/OpenGL.zig | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/apprt/gtk/App.zig b/src/apprt/gtk/App.zig
index d74b07570..12bac989a 100644
--- a/src/apprt/gtk/App.zig
+++ b/src/apprt/gtk/App.zig
@@ -1644,7 +1644,7 @@ fn gtkActionPresentSurface(
// Convert that u64 to pointer to a core surface. A value of zero
// means that there was no target surface for the notification so
- // we dont' focus any surface.
+ // we don't focus any surface.
const ptr_int: u64 = c.g_variant_get_uint64(parameter);
if (ptr_int == 0) return;
const surface: *CoreSurface = @ptrFromInt(ptr_int);
diff --git a/src/apprt/gtk/key.zig b/src/apprt/gtk/key.zig
index 80191b7f5..311bff0da 100644
--- a/src/apprt/gtk/key.zig
+++ b/src/apprt/gtk/key.zig
@@ -129,7 +129,7 @@ pub fn eventMods(
// On Wayland, we have to use the GDK device because the mods sent
// to this event do not have the modifier key applied if it was
- // presssed (i.e. left control).
+ // pressed (i.e. left control).
break :mods translateMods(c.gdk_device_get_modifier_state(device));
};
diff --git a/src/config/Config.zig b/src/config/Config.zig
index e1a7483ea..8283c2a22 100644
--- a/src/config/Config.zig
+++ b/src/config/Config.zig
@@ -2916,7 +2916,7 @@ pub fn loadCliArgs(self: *Config, alloc_gpa: Allocator) !void {
self.@"config-default-files" = true;
// Keep track of the replay steps up to this point so we
- // can replay if we are disgarding the default files.
+ // can replay if we are discarding the default files.
const replay_len_start = self._replay_steps.items.len;
// Keep track of font families because if they are set from the CLI
diff --git a/src/input/key.zig b/src/input/key.zig
index a875611d0..766498d54 100644
--- a/src/input/key.zig
+++ b/src/input/key.zig
@@ -295,7 +295,7 @@ pub const Key = enum(c_int) {
eight,
nine,
- // puncuation
+ // punctuation
semicolon,
space,
apostrophe,
@@ -411,7 +411,7 @@ pub const Key = enum(c_int) {
/// may be from the number row or the keypad, but it always maps
/// to '.zero'.
///
- /// This is what we want, we awnt people to create keybindings that
+ /// This is what we want, we want people to create keybindings that
/// are independent of the physical key.
pub fn fromASCII(ch: u8) ?Key {
return switch (ch) {
diff --git a/src/inspector/termio.zig b/src/inspector/termio.zig
index 78b35e19b..7fea4ecf8 100644
--- a/src/inspector/termio.zig
+++ b/src/inspector/termio.zig
@@ -35,7 +35,7 @@ pub const VTEvent = struct {
const Kind = enum { print, execute, csi, esc, osc, dcs, apc };
const Metadata = std.StringHashMap([:0]const u8);
- /// Initiaze the event information for the given parser action.
+ /// Initialize the event information for the given parser action.
pub fn init(
alloc: Allocator,
surface: *Surface,
diff --git a/src/renderer/OpenGL.zig b/src/renderer/OpenGL.zig
index 6521226a3..5953d50a4 100644
--- a/src/renderer/OpenGL.zig
+++ b/src/renderer/OpenGL.zig
@@ -764,7 +764,7 @@ pub fn updateFrame(
// We used to share terminal state, but we've since learned through
// analysis that it is faster to copy the terminal state than to
- // hold the lock wile rebuilding GPU cells.
+ // hold the lock while rebuilding GPU cells.
var screen_copy = try state.terminal.screen.clone(
self.alloc,
.{ .viewport = .{} },