Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion patches/ghostty-wasm-api.patch
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ new file mode 100644
index 000000000..e79702488
--- /dev/null
+++ b/src/terminal/c/terminal.zig
@@ -0,0 +1,638 @@
@@ -0,0 +1,642 @@
+//! C API wrapper for Terminal
+//!
+//! This provides a C-compatible interface to Ghostty's Terminal for WASM export.
Expand Down Expand Up @@ -817,6 +817,10 @@ index 000000000..e79702488
+ // Initialize the persistent VT stream (must be done after terminal is set)
+ wrapper.stream = wrapper.terminal.vtStream();
+
+ // Enable linefeed mode so \n performs carriage return (moves cursor to column 0)
+ // Without this, \n only moves down without returning to column 0, causing staggered text
+ wrapper.terminal.modes.set(.linefeed, true);
+
+ return @ptrCast(wrapper);
+}
+
Expand Down