Skip to content

Commit 625ff6a

Browse files
fix(web): terminal paste keeps a leading U+FEFF without bracketed paste
The Ghostty core decoded encoder output with a default TextDecoder, which strips a leading UTF-8 BOM. Unbracketed pastes starting with U+FEFF lost that character before reaching the PTY. Decode with ignoreBOM so the bytes the encoder produced pass through unchanged. Fixes #36001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 148c185 commit 625ff6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/web/src/terminal/ghostty

‎apps/web/src/terminal/ghostty/core.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export interface GhosttyMouseInput {
162162
readonly anyButtonPressed: boolean;
163163
}
164164

165-
const decoder = new TextDecoder();
165+
const decoder = new TextDecoder("utf-8", { ignoreBOM: true });
166166
const encoder = new TextEncoder();
167167

168168
function blend(foreground: GhosttyColor, background: GhosttyColor): GhosttyColor {

0 commit comments

Comments
 (0)