Commit Graph

15938 Commits

Author SHA1 Message Date
Yasuhiro Matsumoto
5c4ab6c0de build: pass zig exe path to combine_archives
`combine_archives` spawns `zig ar -M` to combine static archives via
an MRI script. It hard-coded the command name `"zig"` and relied on
the binary being on `PATH`, which fails on Windows when the build is
driven by an absolute zig.exe path (common in CI and in Scoop/winget
installs where PATH isn't populated at build time). The failure
surfaces as `error: FileNotFound` from `Child.spawn`.

Pass `b.graph.zig_exe` as the first argument so the tool always uses
the exact zig binary that is driving the build, matching how other
build tools in this repo spawn zig subcommands.
2026-04-23 09:59:41 +09:00
Jeffrey C. Ollie
880a599d66 windows: provide DllMain stub for non-MSVC ABI (#12373)
Part of preparation for adding a Win32 application runtime (discussion
#2563). One of three small, independent build fixes that together
unblock the Windows GNU-ABI library build.

On Windows with non-MSVC ABI, `pub const DllMain` resolved to `void` (a
type), and Zig's stdlib `start.zig` then tried to call it as a function
via `root.DllMain(...)`, failing to compile with "type 'type' not a
function".

This restructures the conditional so MSVC keeps its existing CRT-init
handler unchanged, non-MSVC Windows gets a no-op `BOOL` handler, and
non-Windows continues to resolve to `void`.

Verified: `zig build -Dtarget=native-native-gnu -Dapp-runtime=none
[-Doptimize=ReleaseSafe]` now builds cleanly on Windows.
2026-04-22 19:14:09 -05:00
Yasuhiro Matsumoto
5a84afef29 address review: collapse DllMain into a single struct
Per review feedback (#12373), fold the nested `if/else if/else` into a
single Windows-gated struct whose handler picks up the abi difference
via a comptime check. This removes the duplicated `const BOOL = ...`
block that the two per-abi structs shared.
2026-04-23 02:17:04 +09:00
ghostty-vouch[bot]
2a3d93f77b Update VOUCHED list (#12374)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/12168#discussioncomment-16672511)
from @jcollie.

Vouch: @mattn

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-22 15:56:43 +00:00
Yasuhiro Matsumoto
2d4d47ed82 windows: provide DllMain stub for non-MSVC ABI
Part of preparation for upstreaming a Win32 application runtime
(see discussion #2563). This is one of three small build-related
fixes that unblock the Windows GNU-ABI library build.

When targeting Windows with GNU ABI, the existing `DllMain` declaration
falls through to `void` (a type), which Zig stdlib's `start.zig` then
attempts to call as a function via `root.DllMain(...)` - producing the
compile error "type 'type' not a function".

Restructure the conditional so that:
  - non-Windows builds keep `DllMain = void`
  - Windows + MSVC keeps the existing CRT-init handler (unchanged)
  - Windows + non-MSVC gets a no-op `BOOL` handler

This unblocks `zig build -Dtarget=native-native-gnu -Dapp-runtime=none`
on Windows.
2026-04-23 00:42:23 +09:00
Jeffrey C. Ollie
98b7ad4c49 libghostty-vt: fix broken dynamic linking with pkg-config (#12364)
~`${prefix}/include` and `${prefix}/lib` are incorrect under
split-prefix installs (e.g. Nix multi-output). Use `b.h_dir` /
`b.lib_dir` instead and drop the unneeded Nix postInstall/postFixup
hooks.~

Refactors the libghostty-vt derivation to:

- fix `libdir` pointing to the wrong output in the pkg-config files.
This would throw a missing library error at runtime.
- reduce the amount of manual copying, linking, and patching of files.

An earlier version of this PR used the zig compiler + `.pc` files to do
this. People pointed out concerns, so I came up with a simpler solution.

Claude Code was used to debug and write an initial fix. Final changes
rewritten and simplified by me. No AI was used to write comments,
descriptions, etc.
2026-04-22 10:35:02 -05:00
Sander
733abbcc39 libghostty-vt: revert .pc changes and use Nix to fix them
Keeps the .pc files templated and instead uses Nix to rewrite the libdir for the static library.
2026-04-21 23:20:06 +02:00
Domen Kožar
38d6451d73 libghostty-vt: emit resolved include/lib dirs in .pc files
`${prefix}/include` and `${prefix}/lib` are wrong under split-prefix installs (e.g. Nix multi-output).
Use `b.h_dir` / `b.lib_dir` instead and drop the unneeded Nix postInstall/postFixup hooks.

Co-Authored-By: Sander <hey@sandydoo.me>
2026-04-21 20:03:53 +02:00
Mitchell Hashimoto
6e0b0311e4 Use patched Zig 0.15.2 on macOS to avoid Xcode 26.4 issue (#12363)
This updates our Nix flake to use the Homebrew bottled Zig 0.15.2 which
contains a patch to work around the issue with Zig 0.15.x and Xcode
26.4.
2026-04-21 09:57:41 -07:00
Mitchell Hashimoto
d2f86028bb Use patched Zig 0.15.2 on macOS to avoid Xcode 26.4 issue
This updates our Nix flake to use the Homebrew bottled Zig 0.15.2 which
contains a patch to work around the issue with Zig 0.15.x and Xcode
26.4.
2026-04-21 09:40:47 -07:00
Mitchell Hashimoto
62fdd885e0 macOS: open preferred config if exists (#12321)
This helps developers like me to use a separate config for debugging
(which is already supported by the environment variable
`GHOSTTY_CONFIG_PATH`).

I can already use the local scheme to load a debugging config file, but
when opening the config file through Ghostty, it will still open the
default config.

This changes doesn't affect the release build, since `configPath` is
only set in the DEBUG build.
2026-04-21 09:23:29 -07:00
Mitchell Hashimoto
95c61e2880 docs,ci: clarify that users can never open issues (#12335)
I removed the entire paragraph in CONTRIBUTING.md because the "Quick
Guide" section explains it all better already.
2026-04-21 09:23:06 -07:00
Mitchell Hashimoto
a6105b3b10 build(xcframework): exclude libghostty-vt headers from GhosttyKit (#12360)
The GhosttyKit xcframework previously shipped the entire include/
directory, which pulled in the libghostty-vt headers under
include/ghostty/. Because those headers are not referenced from the
ghostty.h umbrella, Clang's module system emitted "umbrella header for
module 'GhosttyKit' does not include header 'ghostty/vt/*.h'" warnings
in Xcode builds.

Stage only ghostty.h and module.modulemap via addWriteFiles so the
xcframework Headers directory contains exactly the GhosttyKit API,
mirroring the pattern used in GhosttyLibVt.xcframework.

## AI disclosure

Claude made the changes (including the commit message), I reviewed and
tested them.
2026-04-21 09:22:47 -07:00
ghostty-vouch[bot]
58af471a01 Update VOUCHED list (#12362)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/12361#discussioncomment-16656763)
from @jcollie.

Vouch: @sandydoo

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-21 15:02:46 +00:00
Claude
e9a196c67b build(xcframework): exclude libghostty-vt headers from GhosttyKit
The GhosttyKit xcframework previously shipped the entire include/
directory, which pulled in the libghostty-vt headers under
include/ghostty/. Because those headers are not referenced from the
ghostty.h umbrella, Clang's module system emitted "umbrella header for
module 'GhosttyKit' does not include header 'ghostty/vt/*.h'" warnings
in Xcode builds.

Stage only ghostty.h and module.modulemap via addWriteFiles so the
xcframework Headers directory contains exactly the GhosttyKit API,
mirroring the pattern used in GhosttyLibVt.xcframework.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 14:43:21 +02:00
Jeffrey C. Ollie
3a1482d1a2 build(deps): bump namespacelabs/nscloud-cache-action from 1.4.2 to 1.4.3 (#12355)
Bumps
[namespacelabs/nscloud-cache-action](https://github.com/namespacelabs/nscloud-cache-action)
from 1.4.2 to 1.4.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/namespacelabs/nscloud-cache-action/releases">namespacelabs/nscloud-cache-action's
releases</a>.</em></p>
<blockquote>
<h2>v1.4.3</h2>
<h2>What's Changed</h2>
<ul>
<li>
<p>Add npm mode by <a
href="https://github.com/rcrowe"><code>@​rcrowe</code></a> in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/118">namespacelabs/nscloud-cache-action#118</a></p>
</li>
<li>
<p>Use repeated --path arguments instead of comma-separated values by <a
href="https://github.com/annervisser"><code>@​annervisser</code></a> in
<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/112">namespacelabs/nscloud-cache-action#112</a></p>
</li>
<li>
<p>Bump the minor-actions-dependencies group across 1 directory with 7
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/115">namespacelabs/nscloud-cache-action#115</a></p>
</li>
<li>
<p>Add manual-paths mode test with multiple paths by <a
href="https://github.com/annervisser"><code>@​annervisser</code></a> in
<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/111">namespacelabs/nscloud-cache-action#111</a></p>
</li>
<li>
<p>Bump the minor-npm-dependencies group across 1 directory with 6
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/116">namespacelabs/nscloud-cache-action#116</a></p>
</li>
<li>
<p>Add major-actions-dependencies Dependabot group by <a
href="https://github.com/rcrowe"><code>@​rcrowe</code></a> in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/119">namespacelabs/nscloud-cache-action#119</a></p>
</li>
<li>
<p>Upgrade <code>@​namespacelabs/actions-toolkit</code> to 0.3.0 by <a
href="https://github.com/rcrowe"><code>@​rcrowe</code></a> in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/125">namespacelabs/nscloud-cache-action#125</a></p>
</li>
<li>
<p>Bump the major-actions-dependencies group across 1 directory with 4
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/123">namespacelabs/nscloud-cache-action#123</a></p>
</li>
<li>
<p>Bump the minor-actions-dependencies group across 1 directory with 3
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/122">namespacelabs/nscloud-cache-action#122</a></p>
</li>
<li>
<p>Bump eslint from 9.39.4 to 10.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/121">namespacelabs/nscloud-cache-action#121</a></p>
</li>
<li>
<p>Bump typescript from 5.9.3 to 6.0.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/120">namespacelabs/nscloud-cache-action#120</a></p>
</li>
<li>
<p>Bump <code>@​eslint/js</code> from 9.39.4 to 10.0.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/102">namespacelabs/nscloud-cache-action#102</a></p>
</li>
<li>
<p>Bump typescript from 6.0.2 to 6.0.3 in the minor-npm-dependencies
group by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/126">namespacelabs/nscloud-cache-action#126</a></p>
</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/namespacelabs/nscloud-cache-action/compare/v1...v1.4.3">https://github.com/namespacelabs/nscloud-cache-action/compare/v1...v1.4.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="15799a6b54"><code>15799a6</code></a>
Bump typescript from 6.0.2 to 6.0.3 in the minor-npm-dependencies group
(<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/126">#126</a>)</li>
<li><a
href="a74ba09be4"><code>a74ba09</code></a>
Add npm mode test (<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/118">#118</a>)</li>
<li><a
href="3accca63b2"><code>3accca6</code></a>
Bump <code>@​eslint/js</code> from 9.39.2 to 10.0.1 (<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/102">#102</a>)</li>
<li><a
href="320beceb2e"><code>320bece</code></a>
Bump typescript from 5.9.3 to 6.0.2 (<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/120">#120</a>)</li>
<li><a
href="7b579df1e2"><code>7b579df</code></a>
Bump eslint from 9.39.4 to 10.2.0 (<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/121">#121</a>)</li>
<li><a
href="0170534ed6"><code>0170534</code></a>
Bump the minor-actions-dependencies group with 3 updates (<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/122">#122</a>)</li>
<li><a
href="04d1d76ca0"><code>04d1d76</code></a>
Bump the major-actions-dependencies group across 1 directory with 4
updates (...</li>
<li><a
href="0496385e4a"><code>0496385</code></a>
Upgrade <code>@​namespacelabs/actions-toolkit</code> to 0.3.0 (<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/125">#125</a>)</li>
<li><a
href="e14531ae78"><code>e14531a</code></a>
Add major-actions-dependencies Dependabot group (<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/119">#119</a>)</li>
<li><a
href="1f34f9763c"><code>1f34f97</code></a>
Bump the minor-npm-dependencies group across 1 directory with 6 updates
(<a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/116">#116</a>)</li>
<li>Additional commits viewable in <a
href="a90bb5d4b2...15799a6b54">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=namespacelabs/nscloud-cache-action&package-manager=github_actions&previous-version=1.4.2&new-version=1.4.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2026-04-20 22:34:08 -05:00
dependabot[bot]
5eeb4d9d68 build(deps): bump namespacelabs/nscloud-cache-action from 1.4.2 to 1.4.3
Bumps [namespacelabs/nscloud-cache-action](https://github.com/namespacelabs/nscloud-cache-action) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/namespacelabs/nscloud-cache-action/releases)
- [Commits](a90bb5d4b2...15799a6b54)

---
updated-dependencies:
- dependency-name: namespacelabs/nscloud-cache-action
  dependency-version: 1.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-21 00:53:07 +00:00
Mitchell Hashimoto
c3c8572f7f update zon2nix (#12337)
Adds better Zig 0.16 compatibility.
2026-04-20 11:52:59 -07:00
Mitchell Hashimoto
61363e80d1 macOS: fix App Icon update in Finder (#12344)
Looks like `NSWorkspace.shared.setIcon` can only be called from the main
App, DockTilePlugin is sandboxed and doesn't have the permission to
`file-write-finderinfo`.

<img width="1186" height="144" alt="image"
src="https://github.com/user-attachments/assets/e5ea4f1c-718c-493a-bda2-32787881881e"
/>


It works fine in debug, but not in release. This fixes #11489
2026-04-20 11:52:43 -07:00
Lukas
afdae7293a macos: add pid and tty properties to AppleScript terminal and App Intents TerminalEntity (#11922) 2026-04-20 18:10:57 +02:00
Mitchell Hashimoto
4446dbae33 Misc APC improvements (#12349)
* Fix a memory leak when invalid Kitty graphics data is sent via APC
(this is the only commit for backporting to 1.3.2)
* Add `max_bytes` to limit size of buffered APC data by protocol to
prevent DoS, default to reasonable values
* libghostty: expose max bytes APC options
2026-04-20 09:10:50 -07:00
Mitchell Hashimoto
0069e28cc6 libghostty: expose the APC max byte limits 2026-04-20 08:57:51 -07:00
Mitchell Hashimoto
0509f00ad2 terminal/apc: introduce a max_bytes parameter to prevent DoS 2026-04-20 08:53:02 -07:00
Mitchell Hashimoto
83027407e6 terminal: fix memory leak that could happen with invalid Kitty image cmd 2026-04-20 08:45:41 -07:00
Christo Wilken
9a9002202b macos: add pid and tty properties to AppleScript terminal class
Expose the foreground process PID and TTY device path as read-only properties on the AppleScript terminal class and App Intents TerminalEntity. This enables reliable process-to-terminal mapping for automation tools when multiple terminals share the same CWD.

Closes #11592
Closes #10756

Session: 019d341c-a165-7843-a2f7-2f426114cf17
2026-04-20 15:16:03 +02:00
Lukas
c7a73076e9 macOS: fix App Icon update in Finders
Looks like  `NSWorkspace.shared.setIcon` can only be called from the main App, DockTilePlugin is sandboxed and doesn't have the permission to `file-write-finderinfo`.

It works fine in debug, but not in release. This fixes #11489, #11290
2026-04-20 12:56:55 +02:00
Mitchell Hashimoto
dcc39dcd40 android: Avoid referencing POSIX shared memory functions (#12341)
Stop trying to use POSIX shared memory functions such as `shm_open` on
Android as it's unsupported and the platform libc does not have those
symbols.

This avoids an error such as the below when trying to use
`libghostty-vt` on Android:

> dlopen failed: cannot locate symbol "shm_open" referenced by [..]
2026-04-19 15:21:26 -07:00
Fredrik Fornwall
adb0d793af android: Avoid referencing POSIX shared memory functions
Stop trying to use POSIX shared memory functions such as
`shm_open` on Android as it's unsupported and the platform libc does not
have those symbols.

This avoids an error such as the below when trying to use
`libghostty-vt` on Android:

> dlopen failed: cannot locate symbol "shm_open" referenced by [..]
2026-04-19 23:44:37 +02:00
ghostty-vouch[bot]
d69d937a93 Update VOUCHED list (#12340)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/12339#discussioncomment-16627477)
from @jcollie.

Vouch: @fornwall

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-19 21:38:47 +00:00
Kat
ed29fd56dd Translation documentation-related typos + CODEOWNERS update (#12336) 2026-04-19 20:42:30 +00:00
Kat
2e33589e23 Avoid marking files as owned by ghostty-org/localization.
That team and its children have a very large number of members, so
requests for review from them would make for a mass ping.
2026-04-20 06:23:55 +10:00
Jeffrey C. Ollie
2db58a63fe update zon2nix 2026-04-19 10:51:57 -05:00
Kat
49cd2ba80b Mark i18n_locales.zig as owned by ghostty-org/localization/manager. 2026-04-20 01:25:08 +10:00
Kat
8a6c664686 Fix typo in i18n_locales.zig. 2026-04-20 01:22:09 +10:00
Kat
9cbca54597 Fix typo + improve fluency in README_TRANSLATORS § Viewing translations. 2026-04-20 01:22:09 +10:00
Kat
28b7ef12c3 i18n: add Belarusian translation (be) (#12284)
This PR adds Belarusian (be) language support to Ghostty.

## Changes

- `po/be.po` — new Belarusian translation file (80 strings)
- `src/os/i18n_locales.zig` — added `be` locale
- `CODEOWNERS` — added `/po/be.po @ghostty-org/be_BY`

## Notes

Terminology was cross-referenced with:
- KDE Belarusian translations (l10n.kde.org)
- qBittorrent Belarusian translation
- far2l Belarusian translation
- Ubuntu Belarusian Translators Dictionary
2026-04-19 14:48:32 +00:00
Lukas
7a3e3dc8d2 macOS: fix #12266 by using the correct coordinates for the hitTest (#12322)
Fixes #12266, regression of #11872.
2026-04-19 15:51:49 +02:00
trag1c
cb518e6afd ci: use a custom template for ghostty-vouch issue comments 2026-04-19 15:41:41 +02:00
trag1c
22f9233a0f contributing: don't encourage opening an issue 2026-04-19 15:41:41 +02:00
Illia Krauchanka
f370099d34 i18n: address review feedback (be) 2026-04-19 08:35:31 -03:00
Lukas
5939b8c1be macOS: fix 12266 by using the correct coordinates for the hitTest
Regression of #11872
2026-04-17 20:05:18 +02:00
Lukas
9bad9365b0 macOS: open preferred config if exists 2026-04-17 15:29:29 +02:00
Mitchell Hashimoto
ca7516bea6 macOS: move KeyStateIndicator on top of exit bar (#12282) 2026-04-16 20:33:48 -07:00
ghostty-vouch[bot]
9e080c5a40 Update VOUCHED list (#12302)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/12301#issuecomment-4255856979)
from @trag1c.

Vouch: @bleikurr

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-15 21:56:04 +00:00
Mitchell Hashimoto
d85051a530 macOS: fix shortcuts not showing on menu item for scroll_to_selection and search_selection (#12281)
…

Incorrect link after 9b6a3be993 and
7d0157e69a

Reload following config and see the menu
```
keybind = cmd+j=scroll_to_selection
keybind = cmd+m=search_selection
```

<img width="473" height="222" alt="image"
src="https://github.com/user-attachments/assets/f92c6024-e7f4-496d-9aed-43103c21794d"
/>
2026-04-15 14:15:38 -07:00
Mitchell Hashimoto
551bf0af3f terminal: fix viewport pin during resize reflow (#12300)
Maybe related to #12298?

When Screen resize forwards the active cursor into PageList reflow, a
history-pinned viewport can be remapped into the active area before the
preserved-cursor grow step finishes. The old code kept treating that
viewport as a history pin during the intermediate grow calls, which left
too few rows beneath the pin and tripped the viewport integrity checks.

Fix this by normalizing the viewport back to active as soon as reflow
moves the pinned row into the active area. Add a Screen-level regression
test that exercises the full resize path with bounded scrollback and
wrapped rows, and document the setup so the unwrap and viewport
transition are clear.
2026-04-15 14:04:09 -07:00
Mitchell Hashimoto
815ccb060b terminal: fix viewport pin during resize reflow
Maybe related to #12298?

When Screen resize forwards the active cursor into PageList reflow, a
history-pinned viewport can be remapped into the active area before the
preserved-cursor grow step finishes. The old code kept treating that
viewport as a history pin during the intermediate grow calls, which left
too few rows beneath the pin and tripped the viewport integrity checks.

Fix this by normalizing the viewport back to active as soon as reflow
moves the pinned row into the active area. Add a Screen-level regression
test that exercises the full resize path with bounded scrollback and
wrapped rows, and document the setup so the unwrap and viewport
transition are clear.
2026-04-15 13:59:54 -07:00
Mitchell Hashimoto
43a05dc968 libghostty: Remove all libc++ and libc++ ABI dependencies (#12291)
This updates simdutf to my fork which has a SIMDUTF_NO_LIBCXX option
that removes all libc++ and libc++ ABI dependencies. The plan is to open
an upstream PR with this, but I want to verify it here first.

From there, the hand-written simd code we have has been updated to also
no longer use any libc++ features. Part of this required removing utfcpp
since it depended on libc++ (`<iterator>`).

libghostty-vt now only depends on libc.

## Benchmark Results

| Corpus | Current `HEAD` median | `main` median | Delta vs `main` |
Notes |
| --- | ---: | ---: | ---: | --- |
| `valid-mixed-1g-seed1.bin` | `9.245s` | `9.111s` | `1.5%` slower |
Near tie; `main` remains slightly faster on fully valid input |
| `malformed-mixed-1g-seed1-rate0.005.bin` | `9.251s` | `12.705s` |
`37.3%` faster | Large improvement on malformed UTF-8 input |

Approximate throughput from the medians:

- Valid corpus: current `HEAD` `110.8 MiB/s`, `main` `112.4 MiB/s`
- Malformed corpus: current `HEAD` `110.7 MiB/s`, `main` `80.6 MiB/s`
2026-04-15 11:36:16 -07:00
Mitchell Hashimoto
e51de8b58f libghostty: Remove all libc++ and libc++ ABI dependencies
This updates simdutf to my fork which has a SIMDUTF_NO_LIBCXX option
that removes all libc++ and libc++ ABI dependencies. 

From there, the hand-written simd code we have has been updated to also
no longer use any libc++ features. Part of this required removing utfcpp
since it depended on libc++ (`<iterator>`).

libghostty-vt now only depends on libc.
2026-04-15 10:27:05 -07:00
Mitchell Hashimoto
efa8da6aea nix: update to the latest zon2nix (#12299) 2026-04-15 09:26:29 -07:00