macOS: fix Dictation icon starting above the text, not below

Partially fixes #8493.

After dictating some texts, the icon still appears above, but it will return to its right position after resizing or `\n` (saying newline, not hitting enter).

This behaviour is better than before, where the icon always appeared above.

### Reference:

9e905357bb/src/nsterm.m (L7426)
pull/9488/head
Lars 2025-11-05 18:22:08 +01:00
parent bbaee5e0a0
commit 98ae1dbd10
No known key found for this signature in database
GPG Key ID: 845CB61BD38F4E49
1 changed files with 4 additions and 1 deletions

View File

@ -1728,10 +1728,13 @@ extension Ghostty.SurfaceView: NSTextInputClient {
// 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,
// width should be 0 so that dictation indicator
// can start in the right place
let viewRect = NSMakeRect(
x,
frame.size.height - y,
max(width, cellSize.width),
width,
max(height, cellSize.height))
// Convert the point to the window coordinates