Commit Graph

17578 Commits

Author SHA1 Message Date
Uzair Aftab
10b7158e8c ci: cross-compile freestanding libghostty-vt 2026-08-30 17:06:39 +02:00
Uzair Aftab
3376153a44 build: support native freestanding libghostty-vt
Native freestanding targets cannot emit shared libraries and do not provide an OS page size, stack unwinder, hosted SIMD dependencies, or filesystem-backed Kitty graphics. Build only the static artifact for those targets, define the minimum alignment used for terminal pages, disable hosted-only defaults, and install the public headers with the archive.
2026-08-29 22:13:00 +02:00
Uzair Aftab
a5423592cd libghostty: use caller allocation on native freestanding
Native freestanding targets have neither an OS page allocator nor a usable default SMP allocator. Use the allocator supplied through libghostty for terminal page storage and make a missing C allocator fail with out-of-memory instead of instantiating hosted allocation machinery. Document that native freestanding C callers must supply an allocator for allocating operations.
2026-08-29 22:12:38 +02:00
ghostty-vouch[bot]
7b47213f94 Update VOUCHED list (#14074)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/14072#issuecomment-5463405035)
from @bo2themax.

Vouch: @Svector-anu

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-29 15:59:43 +00:00
Jeffrey C. Ollie
3baff3a069 main: fix inverted allow_stack_tracing condition (#14069)
The Zig 0.16.0 update dropped the negation from the std default
(!strip_debug_info), disabling stack traces in every unstripped build.

AI disclosure: Claude Fable was used to diagnose the problem and find
the fix. Commit message was written by me.


Claude-Session: https://claude.ai/code/session_01QfzQME46DQXwMWa43bQaa3
2026-08-29 10:00:49 -05:00
Jeffrey C. Ollie
069497e0ca gtk: fix stale pointers to property bindings (#14065)
Fixes #14037 where dragging the surface from a tab with just a single
surface to another tab causes a crash.

The cause of the crash is a stale pointer to the property binding
created in `Surface.bindIsSplit`. When the surface is moved,
`SplitTree.moveSplit` first updates the two split tree data structures
of the source/target tab and then calls `bindIsSplit` to bind the
`is-split` property of the moved surface to the `SplitTree` widget in
the target tab. When `bindIsSplit` is called, the `SplitTree` widget in
the source tab has already been destroyed (because the source tab is now
empty) which causes the old binding to be freed automatically and the
pointer `Surface.is_split_binding` becomes stale. `bindIsSplit` then
tries to run `is_split_binding.unbind()` which causes the crash.

When you create a binding with `bindProperty`, the binding itself owns
the initially created reference and it gets freed when the source or
target object of the binding is finalized. To prevent this, we now
create an extra reference to the binding object so that the Surface
widget owns it and is responsible for freeing it. The binding can still
get severed automatically, but the binding object itself will not be
destroyed. This is the solution mentioned in the [GObject
docs](https://docs.gtk.org/gobject/method.Object.bind_property.html).
Alternatively, using a WeakRef for the pointer would have also worked.

Updated the binding in `SurfaceScrolledWindow` to use the same pattern.
That one was probably fine, because the binding should only be created
once, but it doesn't hurt to be safe.

I reproduced the crash on KDE, on Hyprland I just got a glib critical
error message about the invalid pointer. That probably has to do with
what exactly happens to the freed memory, or maybe differing versions.

#### AI Disclosure

Code and comments were written by myself, used GPT5.6 in researching
gobject binding lifecycles.
2026-08-29 09:36:28 -05:00
Jeffrey C. Ollie
caf48a41ee main: fix inverted allow_stack_tracing condition
The Zig 0.16.0 update dropped the negation from the std default
(!strip_debug_info), disabling stack traces in every unstripped build.

AI disclosure: Claude Fable was used to diagnose the problem and find the
fix. Commit message was written by me.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QfzQME46DQXwMWa43bQaa3
2026-08-29 09:21:14 -05:00
Daniel Kinzler
6cd684d5d3 gtk: fix stale pointers to property bindings
Previously, the property binding created in `Surface.bindIsSplit` would
get freed automatically when the source object (the SplitTree widget)
got finalized. A subsequent call to `bindIsSplit` could then cause a
crash by using the stale pointer to the binding. This bug could e.g. be
triggered by dragging the surface from a single-surface tab to another
tab.

We now create an extra reference to the binding object so that Surface
essentially owns the binding and is responsible for freeing it.

Updated the binding in `SurfaceScrolledWindow` to use the same pattern.
That one was probably fine, because the binding is only created once,
but let's be safe.
2026-08-29 12:15:24 +02:00
Mitchell Hashimoto
4540d499ae macOS: review windows when closing multiple tabs (#14062)
We can also make close undoable when quitting, i'll add it as a follow
up pr.

<img width="573" height="450" alt="Xnip2026-08-28_19-25-02"
src="https://github.com/user-attachments/assets/3b4f34f4-9ee6-4180-beb7-f90e98c8aa40"
/>
2026-08-28 11:17:55 -07:00
Lukas
777929a8fe macOS: review windows when closing multiple tabs 2026-08-28 19:32:27 +02:00
Mitchell Hashimoto
76e568b475 terminal: mark the previous row dirty when clearing its spacer head (#14054)
Erasing a wrapped wide character at the start of a row (`ECH` or `DCH`)
also clears the spacer head it left at the end of the previous row, but
that row was never marked dirty. With both rows visible, an incremental
render kept the stale spacer head on screen until something unrelated
redrew that row.

The clearing happens in the row-start branch of `splitCellBoundary`.
`clearCells` doesn't do dirty tracking, and both callers only mark the
cursor row, so mark the previous row at the point it's mutated.

The added dirty assertions fail without the fix.

## AI Disclaimer
Claude did the heavy lifting - identifying the root cause, generating
code and description. I reviewed and iterated on it to move around and
tweak tests, comments and reduce verboseness. Verified the end user
visible behaviour improvement with a script that coloured the wide
character, which made the stale rendering visible until a switch to the
alt screen and back cleared it it.
2026-08-27 20:32:12 -07:00
Fredrik Fornwall
eb722cb26d terminal: mark the previous row dirty when clearing its spacer head
Erasing a wrapped wide character at the start of a row (ECH or DCH)
also clears the spacer head it left at the end of the previous row,
but that row was never marked dirty. With both rows visible, an
incremental render kept the stale spacer head on screen until
something unrelated redrew that row.

The clearing happens in the row-start branch of splitCellBoundary.
clearCells doesn't do dirty tracking, and both callers only mark
the cursor row, so mark the previous row at the point it's mutated.

The added dirty assertions fail without the fix.
2026-08-28 02:07:51 +02:00
trag1c
5aeb693b77 i18n: Russian translation for 1.4 (#13809) 2026-08-28 00:23:17 +02:00
Mitchell Hashimoto
fac595c741 macos: normalize action working directory paths (#14051)
Discussion #14048

Directory URLs no longer export a trailing slash through PWD, which
keeps zsh's %1~ prompt expansion from resolving to an empty string.

A shared URL helper removes trailing separators while preserving the
filesystem root and percent-decoding behavior. Tests cover normal,
repeated, encoded, and root paths.
2026-08-27 15:22:38 -07:00
Mitchell Hashimoto
1c3a4a8314 Update macos/Sources/Helpers/Extensions/URL+Extension.swift
Co-authored-by: Lukas <134181853+bo2themax@users.noreply.github.com>
2026-08-27 14:58:06 -07:00
Mitchell Hashimoto
07abbd1e7e Update macos/Sources/Helpers/Extensions/URL+Extension.swift
Co-authored-by: Lukas <134181853+bo2themax@users.noreply.github.com>
2026-08-27 14:57:59 -07:00
Mitchell Hashimoto
2de1596115 macos: normalize action working directory paths
Discussion #14048

Directory URLs no longer export a trailing slash through PWD, which
keeps zsh's %1~ prompt expansion from resolving to an empty string.

A shared URL helper removes trailing separators while preserving the
filesystem root and percent-decoding behavior. Tests cover normal,
repeated, encoded, and root paths.
2026-08-27 14:35:01 -07:00
Mitchell Hashimoto
4f4589f31f macOS: use the same default BellFeatures as config (#14049) 2026-08-27 14:27:55 -07:00
Lukas
572fd58377 macOS: use the same default BellFeatures as config 2026-08-27 23:17:17 +02:00
Mitchell Hashimoto
890aa63dbb font: update embedded Noto emoji fonts (#14047)
Fixes #14046

Update Noto Color Emoji from v2.034 to v2.051 and Noto Emoji Regular
from v1.002 to v3.005.

The old assets predate Unicode 15.0 and decompose newer ZWJ sequences
into separate glyphs. This causes sequences such as the Emoji 15.1
head-shaking faces to overlap neighboring terminal cells. The new assets
provide the missing sequence glyphs through Unicode 17.0.

New supported glyphs too:

| Codepoint | Glyph | Name |
|-----------|-------|------|
| U+1F6D8 | 🛘 | LANDSLIDE |
| U+1F6DC | 🛜 | WIRELESS |
| U+1FA75 | 🩵 | LIGHT BLUE HEART |
| U+1FA76 | 🩶 | GREY HEART |
| U+1FA77 | 🩷 | PINK HEART |
| U+1FA87 | 🪇 | MARACAS |
| U+1FA88 | 🪈 | FLUTE |
| U+1FA89 | 🪉 | HARP |
| U+1FA8A | 🪊 | TROMBONE |
| U+1FA8E | 🪎 | TREASURE CHEST |
| U+1FA8F | 🪏 | SHOVEL |
| U+1FAAD | 🪭 | FOLDING HAND FAN |
| U+1FAAE | 🪮 | HAIR PICK |
| U+1FAAF | 🪯 | KHANDA |
| U+1FABB | 🪻 | HYACINTH |
| U+1FABC | 🪼 | JELLYFISH |
| U+1FABD | 🪽 | WING |
| U+1FABE | 🪾 | LEAFLESS TREE |
| U+1FABF | 🪿 | GOOSE |
| U+1FAC6 | 🫆 | FINGERPRINT |
| U+1FAC8 | 🫈 | HAIRY CREATURE |
| U+1FACD | 🫍 | ORCA |
| U+1FACE | 🫎 | MOOSE |
| U+1FACF | 🫏 | DONKEY |
| U+1FADA | 🫚 | GINGER ROOT |
| U+1FADB | 🫛 | PEA POD |
| U+1FADC | 🫜 | ROOT VEGETABLE |
| U+1FADF | 🫟 | SPLATTER |
| U+1FAE8 | 🫨 | SHAKING FACE |
| U+1FAE9 | 🫩 | FACE WITH BAGS UNDER EYES |
| U+1FAEA | 🫪 | DISTORTED FACE |
| U+1FAEF | 🫯 | FIGHT CLOUD |
| U+1FAF7 | 🫷 | LEFTWARDS PUSHING HAND |
| U+1FAF8 | 🫸 | RIGHTWARDS PUSHING HAND |
2026-08-27 12:58:32 -07:00
Mitchell Hashimoto
28b5bf9059 font: update embedded Noto emoji fonts
Fixes #14046

Update Noto Color Emoji from v2.034 to v2.051 and Noto Emoji
Regular from v1.002 to v3.005.

The old assets predate Unicode 15.0 and decompose newer ZWJ sequences
into separate glyphs. This causes sequences such as the Emoji 15.1
head-shaking faces to overlap neighboring terminal cells. The new
assets provide the missing sequence glyphs through Unicode 17.0.

New supported glyphs too:

| Codepoint | Glyph | Name |
|-----------|-------|------|
| U+1F6D8 | 🛘 | LANDSLIDE |
| U+1F6DC | 🛜 | WIRELESS |
| U+1FA75 | 🩵 | LIGHT BLUE HEART |
| U+1FA76 | 🩶 | GREY HEART |
| U+1FA77 | 🩷 | PINK HEART |
| U+1FA87 | 🪇 | MARACAS |
| U+1FA88 | 🪈 | FLUTE |
| U+1FA89 | 🪉 | HARP |
| U+1FA8A | 🪊 | TROMBONE |
| U+1FA8E | 🪎 | TREASURE CHEST |
| U+1FA8F | 🪏 | SHOVEL |
| U+1FAAD | 🪭 | FOLDING HAND FAN |
| U+1FAAE | 🪮 | HAIR PICK |
| U+1FAAF | 🪯 | KHANDA |
| U+1FABB | 🪻 | HYACINTH |
| U+1FABC | 🪼 | JELLYFISH |
| U+1FABD | 🪽 | WING |
| U+1FABE | 🪾 | LEAFLESS TREE |
| U+1FABF | 🪿 | GOOSE |
| U+1FAC6 | 🫆 | FINGERPRINT |
| U+1FAC8 | 🫈 | HAIRY CREATURE |
| U+1FACD | 🫍 | ORCA |
| U+1FACE | 🫎 | MOOSE |
| U+1FACF | 🫏 | DONKEY |
| U+1FADA | 🫚 | GINGER ROOT |
| U+1FADB | 🫛 | PEA POD |
| U+1FADC | 🫜 | ROOT VEGETABLE |
| U+1FADF | 🫟 | SPLATTER |
| U+1FAE8 | 🫨 | SHAKING FACE |
| U+1FAE9 | 🫩 | FACE WITH BAGS UNDER EYES |
| U+1FAEA | 🫪 | DISTORTED FACE |
| U+1FAEF | 🫯 | FIGHT CLOUD |
| U+1FAF7 | 🫷 | LEFTWARDS PUSHING HAND |
| U+1FAF8 | 🫸 | RIGHTWARDS PUSHING HAND |
2026-08-27 12:39:52 -07:00
Mitchell Hashimoto
e9ad4b1d63 macOS: fix non control keys are not working for AppleScript (#13205)
`send key` only works for control keys like `enter` currently; this adds
(fixes) the support for other keys listed as available. Found by
@paaloeye in #13180

The core of this fix is relying on `UCKeyTranslate` to get the
corresponding character and code point from a key code using
`KeyboardLayout.character(for:modifiers:)`.

ScriptKeyEventCommand now respects `macos-option-as-alt`, and attach
`text`, `unshifted_codepoint` and `consumed_mods` under the same
condition as a manual input events like in `performKeyEquivalent` and
`localEventKeyDown`.

## AI Disclosure

Claude did the heavy lifting, I reviewed and rephrased some of the
comments it generated. And ofc reviewed and tested myself.
2026-08-27 09:33:24 -07:00
derVedro
278b4e2fc7 i18n(ru): refine Russian translation 2026-08-27 12:21:51 +02:00
Mitchell Hashimoto
f2d5758f63 terminal/snapshot: use stack fallback for record scratch (#14018)
Use a bounded 512-byte stack fallback for complete-snapshot record
scratch. Small records avoid heap growth while larger records continue
through the heap allocator.

This usually means 2 fewer allocations per encode, resulting in a small
performance improvement in a local benchmark:

| Workload | `main` median | Branch median | Change |
|---|---:|---:|---:|
| Empty, 50k encodes | 135.06 ms | 130.76 ms | **3.2% faster** |
| 1 MiB ASCII, 500 encodes | 280.75 ms | 281.25 ms | **0.2% slower**,
within noise |
| 1 MiB styled, 200 encodes | 1,023.02 ms | 996.32 ms | **2.6% faster**
|
2026-08-26 19:52:24 -07:00
Jeffrey C. Ollie
f349d10843 build(deps): bump hustcer/milestone-action from 3.1 to 3.2 (#14040)
Bumps
[hustcer/milestone-action](https://github.com/hustcer/milestone-action)
from 3.1 to 3.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hustcer/milestone-action/releases">hustcer/milestone-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.2</h2>
<h2>[3.2] - 2026-08-25</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Harden action inputs and make GraphQL file lookup path-independent
(<a
href="https://redirect.github.com/hustcer/milestone-action/issues/168">#168</a>)</li>
<li>Look up milestones by title across all states with pagination (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/170">#170</a>)</li>
<li>Guard GITHUB_OUTPUT, surface GraphQL errors and tighten is-int (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/172">#172</a>)</li>
<li>Require title for create action and sync stale docs (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/174">#174</a>)</li>
<li>Send milestone fields as raw strings and harden action inputs (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/176">#176</a>)</li>
</ul>
<h3>Deps</h3>
<ul>
<li>Upgrade hustcer/setup-nu to v3.25 &amp; Nu to 0.113.1</li>
<li>Upgrade hustcer/setup-nu to v3.27 and Nu to 0.115</li>
<li>Upgrade Nu to 0.115.1</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hustcer/milestone-action/blob/main/CHANGELOG.md">hustcer/milestone-action's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<h2>[3.2] - 2026-08-25</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Harden action inputs and make GraphQL file lookup path-independent
(<a
href="https://redirect.github.com/hustcer/milestone-action/issues/168">#168</a>)</li>
<li>Look up milestones by title across all states with pagination (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/170">#170</a>)</li>
<li>Guard GITHUB_OUTPUT, surface GraphQL errors and tighten is-int (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/172">#172</a>)</li>
<li>Require title for create action and sync stale docs (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/174">#174</a>)</li>
<li>Send milestone fields as raw strings and harden action inputs (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/176">#176</a>)</li>
</ul>
<h3>Deps</h3>
<ul>
<li>Upgrade hustcer/setup-nu to v3.25 &amp; Nu to 0.113.1</li>
<li>Upgrade hustcer/setup-nu to v3.27 and Nu to 0.115</li>
<li>Upgrade Nu to 0.115.1</li>
</ul>
<h2>[3.1] - 2026-01-23</h2>
<h3>Documentation</h3>
<ul>
<li>Update milestone-action version in README (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/162">#162</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>Break before sleep when milestone found</li>
</ul>
<h3>Miscellaneous Tasks</h3>
<ul>
<li>Update README.md (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/166">#166</a>)</li>
</ul>
<h3>Deps</h3>
<ul>
<li>Update Nu to 0.109.1</li>
<li>Update Nushell to 0.110.0 (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/167">#167</a>)</li>
<li>Upgrade hustcer/setup-nu to v3.22</li>
</ul>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<h2>[3.0] - 2025-10-26</h2>
<p>This release introduces changes that may impact some users. If the
action fails due to insufficient permissions, please add the
<code>issues: write</code> and <code>pull-requests: write</code>
permissions to your workflow. Additionally, the API for binding
milestones has been modified. Due to these changes, the major version
has been incremented to 3.</p>
<h3>Bug Fixes</h3>
<ul>
<li>Try to fix GitHub Projects (classic) deprecation warning by using
REST API instead of GraphQL (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/157">#157</a>)</li>
<li>Fix &quot;Resource not accessible by integration&quot; error for
issue milestone binding by adding <code>issues: write</code>
permission</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2f38355153"><code>2f38355</code></a>
Bump to v3.2</li>
<li><a
href="90d6122217"><code>90d6122</code></a>
deps: Upgrade Nu to 0.115.1</li>
<li><a
href="e587063f37"><code>e587063</code></a>
fix: Send milestone fields as raw strings and harden action inputs (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/176">#176</a>)</li>
<li><a
href="cc2b756fd4"><code>cc2b756</code></a>
fix: Require title for create action and sync stale docs (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/174">#174</a>)</li>
<li><a
href="f8cedae0c1"><code>f8cedae</code></a>
fix: Guard GITHUB_OUTPUT, surface GraphQL errors and tighten is-int (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/172">#172</a>)</li>
<li><a
href="b57a2e26d7"><code>b57a2e2</code></a>
fix: Look up milestones by title across all states with pagination (<a
href="https://redirect.github.com/hustcer/milestone-action/issues/170">#170</a>)</li>
<li><a
href="3ba8f40c95"><code>3ba8f40</code></a>
fix: Harden action inputs and make GraphQL file lookup path-independent
(<a
href="https://redirect.github.com/hustcer/milestone-action/issues/168">#168</a>)</li>
<li><a
href="1e6a3fcc55"><code>1e6a3fc</code></a>
deps: Upgrade hustcer/setup-nu to v3.27 and Nu to 0.115</li>
<li><a
href="9131595492"><code>9131595</code></a>
deps: Upgrade hustcer/setup-nu to v3.25 &amp; Nu to 0.113.1</li>
<li>See full diff in <a
href="ebed8d5daa...2f38355153">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hustcer/milestone-action&package-manager=github_actions&previous-version=3.1&new-version=3.2)](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-08-26 21:05:27 -05:00
dependabot[bot]
522ebdd0a3 build(deps): bump hustcer/milestone-action from 3.1 to 3.2
Bumps [hustcer/milestone-action](https://github.com/hustcer/milestone-action) from 3.1 to 3.2.
- [Release notes](https://github.com/hustcer/milestone-action/releases)
- [Changelog](https://github.com/hustcer/milestone-action/blob/main/CHANGELOG.md)
- [Commits](ebed8d5daa...2f38355153)

---
updated-dependencies:
- dependency-name: hustcer/milestone-action
  dependency-version: '3.2'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-27 00:13:14 +00:00
derVedro
915977a484 i18n(ru): equalize splits 2026-08-26 23:37:42 +02:00
Mitchell Hashimoto
b69f612672 macOS: update note about tab accessory view (#14038)
Reverts: #14028
2026-08-26 13:57:52 -07:00
Lukas
0a9f47cae0 macOS: update note about tab accessory view 2026-08-26 22:45:56 +02:00
Lukas
b6ac6e1d47 Revert "macOS: use same ResetZoomAccessoryView (#14028)"
This reverts commit 15ff186f65, reversing
changes made to 1abd53ee53.
2026-08-26 22:44:12 +02:00
Mitchell Hashimoto
d9840f3c8f renderer: park DisplayLink while idle (#14035)
#14033

Pause the CVDisplayLink when there isn't any real work to do.

Start the link after updateFrame rebuilds cells, keep it running while
cell changes or animations remain pending, and resync it from the
no-redraw path to sleep it again.

I also did some benchmark to measure the cost of starting/stopping the
display link since this includes a lot more of that and I found that a
continuously running link used 29 to 35 us of CPU per callback, while
starting and stopping it for every frame used 103 to 121 us. So, in some
pathological case this can be worse, but its still microseconds, and in
the normal case this helps Ghostty sleep a lot more.
2026-08-26 11:35:35 -07:00
Mitchell Hashimoto
6688aa072f renderer: park DisplayLink while idle
#14033

Pause the CVDisplayLink when there isn't any real work to do.

Start the link after updateFrame rebuilds cells, keep it running while
cell changes or animations remain pending, and resync it from the
no-redraw path to sleep it again. 

I also did some benchmark to measure the cost of starting/stopping the
display link since this includes a lot more of that and I found that
a continuously running link used 29 to 35 us of CPU per callback, while
starting and stopping it for every frame used 103 to 121 us. So, in some
pathological case this can be worse, but its still microseconds, and in
the normal case this helps Ghostty sleep a lot more.

Co-authored-by: Jesse Miller <jmiller@jmiller.com>
2026-08-26 11:11:42 -07:00
derVedro
84dff76b13 Update po/ru.po
Co-authored-by: TicClick <ya@ticclick.ch>
2026-08-26 19:15:58 +02:00
derVedro
6244458a11 Update po/ru.po
Co-authored-by: TicClick <ya@ticclick.ch>
2026-08-26 19:00:00 +02:00
Mitchell Hashimoto
15ff186f65 macOS: use same ResetZoomAccessoryView (#14028) 2026-08-26 06:52:39 -07:00
Mitchell Hashimoto
1abd53ee53 macOS: clean up deprecated toolbar button (#14027)
This button is a leftover from cf6017e777,
we're now using tab's and titlebar's accessory view to display unzoom
buttons, no need to keep them.
2026-08-26 06:52:27 -07:00
Lukas
7a15898bc8 macOS: use same ResetZoomAccessoryView 2026-08-26 13:28:11 +02:00
trag1c
5f5b988c52 i18n: update fr_FR translations (#13971)
Update missing french translations for Ghostty 1.4
(https://github.com/ghostty-org/ghostty/issues/13766)
2026-08-26 10:58:30 +02:00
Lukas
851751a116 macOS: clean up deprecated toolbar button 2026-08-26 10:21:40 +02:00
Mitchell Hashimoto
88f57ee66e terminal: ignore UTF-8-decoded C1 controls in the ground state (#14023)
Drop UTF-8 decoded C1 controls entirely. This matches xterm's default
behavior which is our standard policy (but note it diverges from libvte
which executes them). There isn't really any standard I could find
around this.

The ground state UTF-8 fast paths (both the scalar decoder and the
batched SIMD path) previously treated decoded codepoints C1 control
codepoints as normal UTF-8 text and routed them to print.
2026-08-25 21:27:42 -07:00
Mitchell Hashimoto
40a40f848d terminal: ignore UTF-8-decoded C1 controls in the ground state
Drop UTF-8 decoded C1 controls entirely. This matches xterm's default
behavior which is our standard policy (but note it diverges from libvte
which executes them). There isn't really any standard I could find
around this.

The ground state UTF-8 fast paths (both the scalar decoder and the
batched SIMD path) previously treated decoded codepoints C1 control
codepoints as normal UTF-8 text and routed them to print.
2026-08-25 21:08:55 -07:00
Mitchell Hashimoto
6dcf68fc0b terminal: execute C0 controls 0x10-0x1F in the ground state (#14022)
Fixes #14021

The ground state UTF-8 fast paths only classified 0x00-0x0F plus 0x1B
(escape) as C0 controls. The remaining C0 bytes (0x10-0x1A, 0x1C-0x1F)
were decoded as ordinary codepoints and routed to print as if they were
text.

This resulted in incorrect grids but also very weird font fallback, e.g.
U+0014 would find CJK fonts.

This commit fixes this by routing every ground state C0 byte except ESC
to execute as it should be.
2026-08-25 20:37:37 -07:00
Mitchell Hashimoto
0f35043c9a terminal: execute C0 controls 0x10-0x1F in the ground state
Fixes #14021

The ground state UTF-8 fast paths only classified 0x00-0x0F plus 0x1B (escape)
as C0 controls. The remaining C0 bytes (0x10-0x1A, 0x1C-0x1F) were decoded 
as ordinary codepoints and routed to print as if they were text.

This resulted in incorrect grids but also very weird font fallback, e.g.
U+0014 would find CJK fonts.

This commit fixes this by routing every ground state C0 byte except ESC to 
execute as it should be.
2026-08-25 20:22:21 -07:00
Lou Ferrand
73e53ceeac i18n: update fr_FR translations 2026-08-26 00:41:51 +02:00
Jon Parise
ee8095d37d terminal/snapshot: use stack fallback for record scratch
Use a bounded 512-byte stack fallback for complete-snapshot record
scratch. Small records avoid heap growth while larger records continue
through the heap allocator.
2026-08-25 14:20:58 -04:00
Mitchell Hashimoto
683d8db643 renderer: release GPU resources for hidden surfaces (macOS) (#14017)
Ref #12034

This commit releases many GPU resources when a surface becomes invisible
and rebuilds it on the next draw. I don't say "all" because there are
still some things we can improve on (Kitty images).

We previously held onto all GPU resources for the lifetime of the
surface regardless of its visibility state. This is 3x (for
triple-buffering): screen render targets, uniform/cell/custom shader
buffers, font textures, and more.

Measured on macOS (Metal):

| Measurement (1 visible + 20 hidden tabs)    | Before    | After   |
|---------------------------------------------|-----------|---------|
| Tracked GPU allocations (steady state)      | 384.6 MiB | 18.3 MiB |
| `MTLDevice.currentAllocatedSize`            | 393.3 MiB | 19.7 MiB |
| `footprint` IOSurface (dirty)               | 309 MB    | 15 MB   |
| Swap chain rebuild on unhide (42 tab switches) | n/a | avg 0.43 ms,
max 0.55 ms |

As you can see, importantly, swap chain rebuild is fast: 0.43ms average.
That means that the rebuild is imperceptible and happens well within a
frame draw time.

This is macOS only, but most of the work was in the generic renderer.
GTK only needs to call `releaseGpuResources` when it becomes invisible
to get the same benefits. I didn't have my VM handy to test this yet so
I didn't include it.
2026-08-25 11:08:01 -07:00
Mitchell Hashimoto
c4e16970a8 renderer: release GPU resources for hidden surfaces (macOS)
Ref #12034

This commit releases many GPU resources when a surface becomes invisible and
rebuilds it on the next draw. I don't say "all" because there are still
some things we can improve on (Kitty images).

We previously held onto all GPU resources for the lifetime of the surface
regardless of its visibility state. This is 3x (for triple-buffering): 
screen render targets, uniform/cell/custom shader buffers, font textures,
and more.

Measured on macOS (Metal):

| Measurement (1 visible + 20 hidden tabs)    | Before    | After   |
|---------------------------------------------|-----------|---------|
| Tracked GPU allocations (steady state)      | 384.6 MiB | 18.3 MiB |
| `MTLDevice.currentAllocatedSize`            | 393.3 MiB | 19.7 MiB |
| `footprint` IOSurface (dirty)               | 309 MB    | 15 MB   |
| Swap chain rebuild on unhide (42 switches)  | n/a       | avg 0.43 ms, max 0.55 ms |

As you can see, importantly, swap chain rebuild is fast: 0.43ms average.
That means that the rebuild is imperceptible and happens well within
a frame draw time.

This is macOS only, but most of the work was in the generic renderer.
GTK only needs to call `releaseGpuResources` when it becomes invisible
to get the same benefits. I didn't have my VM handy to test this yet so
I didn't include it.
2026-08-25 10:46:11 -07:00
Lukas
6229d4eb62 macOS: fix AppleScript send key for non-control keys
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 17:49:02 +02:00
Mitchell Hashimoto
9c3ec931d6 terminal: treat high bytes in DCS strings as payload data (#14016)
Refs #11216

The dcs_passthrough state only forwarded bytes 0x00-0x7E to the DCS
handler. Bytes 0x80-0x9F hit the "anywhere" C1 transitions and exited
the string, while 0xA0-0xFF fell through to the default transition and
were silently dropped. **This breaks any DCS payload carrying UTF-8. **

A continuation byte in the C1 range terminates or corrupts the string:
"Ü" is 0xC3 0x9C, so the 0xC3 is dropped and the 0x9C acts as 8-bit ST,
ending the DCS mid-character.

Also, a payload byte such as 0x9B (second byte of "Û") transitions to
csi_entry, so the remainder of the payload executes as a live control
sequence. This is a prerequisite for tmux control mode (#1935), whose
%output notifications carry raw UTF-8 pane content.

Fix this in the parse table only: override 0x80-0xFF in dcs_passthrough
to put and in dcs_ignore to ignore, exactly how osc_string already
claims 0x20-0xFF (including 0x9C) as data. This deviates from the
vt100.net state machine
(https://vt100.net/emu/dec_ansi_parser) deliberately and includes 0x9C:
a raw 0x9C is indistinguishable from a UTF-8 continuation byte, and we
don't honor 8-bit C1 controls in the ground state either.
2026-08-25 08:42:26 -07:00
Jeffrey C. Ollie
b260da24f8 cli: update list-themes preview sample to valid Zig 0.16 syntax (#14012)
The demo code shown in the `+list-themes` theme preview was stale from
before the Zig 0.16 migration (context: #12228). It referenced
`std.Io.getStdOut().writer()`, which never existed in any Zig release,
and `pub fn main() !void`. This rewrites the rendered sample to valid
Zig 0.16 idioms:

```zig
const std = @import("std");

pub fn main(init: std.process.Init) !void {
    var buf: [1024]u8 = undefined;
    var stdout = std.Io.File.stdout().writer(init.io, &buf);
    const w = &stdout.interface;

    var i: usize = 1;
    while (i <= 16) : (i += 1) {
        if (i % 15 == 0) {
            try w.writeAll("ZiggZagg\n");
        } else if (i % 3 == 0) {
            try w.writeAll("Zigg\n");
        } else if (i % 5 == 0) {
            try w.writeAll("Zagg\n");
        } else {
            try w.print("{d}\n", .{i});
        }
    }
    try w.flush();
}
```

The gutter line numbers, row offsets, and child window height were
renumbered to match, and the zig version shown in the demo prompt line
was updated from v0.13.0 to v0.16.0.
2026-08-25 10:35:12 -05:00