mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: insertText should not include null char
This commit is contained in:
@ -841,10 +841,13 @@ extension Ghostty {
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
let len = chars.utf8CString.count
|
||||
if (len == 0) { return }
|
||||
|
||||
chars.withCString { ptr in
|
||||
ghostty_surface_text(surface, ptr, UInt(len))
|
||||
// len includes the null terminator so we do len - 1
|
||||
ghostty_surface_text(surface, ptr, UInt(len - 1))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user