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:
@ -843,8 +843,11 @@ extension Ghostty {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let len = chars.utf8CString.count
|
let len = chars.utf8CString.count
|
||||||
|
if (len == 0) { return }
|
||||||
|
|
||||||
chars.withCString { ptr in
|
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