From 011fc77caa5a12c5009577cdd1602da3ede6a8dd Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Sun, 16 Nov 2025 12:17:31 +0100 Subject: [PATCH] macOS: Fix dictation icon's position while speaking --- macos/Sources/Ghostty/SurfaceView_AppKit.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/macos/Sources/Ghostty/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/SurfaceView_AppKit.swift index 063b13300..6e3597fd3 100644 --- a/macos/Sources/Ghostty/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/SurfaceView_AppKit.swift @@ -1740,7 +1740,13 @@ extension Ghostty.SurfaceView: NSTextInputClient { } else { ghostty_surface_ime_point(surface, &x, &y, &width, &height) } - + if range.length == 0, width > 0 { + // This fixes #8493 while speaking + // My guess is that positive width doesn't make sense + // for the dictation microphone indicator + width = 0 + x += cellSize.width * Double(range.location + range.length) + } // Ghostty coordinates are in top-left (0, 0) so we have to convert to // bottom-left since that is what UIKit expects // when there's is no characters selected,