Commit Graph

14974 Commits

Author SHA1 Message Date
Mitchell Hashimoto
125b6e9f6c Clear key state overlay on "ignore" action (#11103)
This fixes a bug in the key state sequence overlay.

## Demo

In my ghostty config, I have

    keybind = ctrl+space>escape=ignore
    keybind = ctrl+space>p=toggle_command_palette
    ...

because I use `ctrl+space>` sequences for most things and so hitting
`esc` is my way to bail out of the sequence if I change my mind.

I just switched to tip and got the new GTK key sequence overlay. Here's
what I saw. In these screen recordings, the sequence of keys I press is

ctrl+space, escape, ctrl+space, escape, ctrl+space, escape, ctrl+space,
p


https://github.com/user-attachments/assets/4a37bc7e-b75c-4bd1-99de-f21f4211b5b5

after the fix:


https://github.com/user-attachments/assets/023be88e-1299-4219-920c-1b1134b2888c

## Notes

I believe this was also a leak, since the queued keys wouldn't be
deinited.

**AI usage:** Claude Code suggested the fix, then I read enough code to
convince myself that it makes sense.
2026-03-01 13:15:55 -08:00
Alexandre Antonio Juca
c735fd8c47 Update CONTRIBUTING.md
Co-authored-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2026-03-01 22:05:30 +01:00
Alexandre Antonio Juca
3972426852 chore: improve grammer 2026-03-01 21:56:46 +01:00
Alexandre Antonio Juca
fa2a74d765 Update CONTRIBUTING.md
Co-authored-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2026-03-01 21:52:19 +01:00
Alexandre Antonio Juca
56f3b3d060 Update CONTRIBUTING.md
Co-authored-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2026-03-01 21:52:11 +01:00
Alexandre Antonio Juca
059b02eacb Update CONTRIBUTING.md
Co-authored-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2026-03-01 21:51:52 +01:00
Alexandre Antonio Juca
a0b7714898 Update CONTRIBUTING.md
Co-authored-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2026-03-01 21:51:07 +01:00
Mitchell Hashimoto
683de81ee9 typos: ignore fuzz corpus 2026-03-01 09:21:56 -08:00
Mitchell Hashimoto
f43874a168 fuzz: update corpus 2026-03-01 09:20:47 -08:00
Mitchell Hashimoto
7bc44e77d0 shellcheck 2026-03-01 06:54:06 -08:00
Mitchell Hashimoto
41870c14ad ci: test libghostty fuzzer build 2026-03-01 06:53:30 -08:00
Mitchell Hashimoto
e8f861f561 fuzz: replace : with _ for Windows 2026-03-01 06:47:01 -08:00
Mitchell Hashimoto
4f34a0b7d2 ci: fix windows CI checkouts with afl-min filenames 2026-03-01 06:42:58 -08:00
Mitchell Hashimoto
9771aaaebb 🐛 Prevent git log output with signature information (#11094)
When users have something like

[log]
        showSignature = true

in their .gitconfig files, invocations of the log or show git
sub-command emit additional information about signatures. This
additional output disturbs the generation of short_hash in
GitVersion.zig, the additional text is copied verbatim into the string
and then shown in the CSI >q output.

To fix it always suppress the output of the signature information. This
has no effects when the setting is disabled anyway.
2026-03-01 06:39:36 -08:00
ghostty-vouch[bot]
4bef13a4d0 Update VOUCHED list (#11099)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/11090#discussioncomment-15962101)
from @jcollie.

Vouch: @cespare

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-01 14:28:35 +00:00
ghostty-vouch[bot]
6cf8f13189 Update VOUCHED list (#11098)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/11094#issuecomment-3980080445)
from @jcollie.

Vouch: @drepper

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-01 14:26:26 +00:00
Alexandre Antonio Juca
2ed0e3b82b fix: format with prettier 2026-03-01 12:51:47 +01:00
Alexandre Antonio Juca
fc4d5a40dd chore: add improvements 2026-03-01 12:30:25 +01:00
Alexandre Antonio Juca
7cf8e0ccc0 docs: clarify if pre-vouching contributors are also required to apply to get vouched before contributing to Ghostty 2026-03-01 12:02:20 +01:00
Ulrich Drepper
851b62d738 🐛 Prevent git log output with signature information
When users have something like

[log]
        showSignature = true

in their .gitconfig files, invocations of the log or show git sub-command
emit additional information about signatures.  This additional output
disturbs the generation of short_hash in GitVersion.zig, the additional text
is copied verbatim into the string and then shown in the CSI >q output.

To fix it always suppress the output of the signature information.  This
has no effects when the setting is disabled anyway.
2026-03-01 10:51:48 +01:00
ghostty-vouch[bot]
33c855e047 Update VOUCHED list (#11093)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/5036#issuecomment-3979553300)
from @jcollie.

Vouch: @AlexJuca

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-01 09:16:02 +00:00
Caleb Spare
0ccaf3d5d6 Clear key state overlay on "ignore" action 2026-02-28 23:35:28 -08:00
Mitchell Hashimoto
2685efca7a pkg/afl++: remove file arg 2026-02-28 21:14:52 -08:00
Mitchell Hashimoto
346248251e typos 2026-02-28 21:14:52 -08:00
Mitchell Hashimoto
23f6b1af65 pkg/afl++: fuzzer takes a file argument 2026-02-28 21:14:52 -08:00
Mitchell Hashimoto
2bd09523c8 pkg/afl++: use usize for len 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
eb7d28d180 Corpus management update 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
1d9f080309 test/fuzz-libghostty: add README 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
afabbaf012 pkg/afl++: extract runner 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
54bdbdf87d pkg/afl++: clean up, comments 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
2a340536a6 test/fuzz-libghostty: add zig build run 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
673dd474f8 test/fuzz-libghostty: gitignore and initial corpus 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
3294621430 switch to pkg/afl++ for fuzz 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
4e47c225b1 pkg/afl++ 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
adbb432930 test/fuzz-libghostty: basic afl++-based fuzzer for libghostty 2026-02-28 21:14:51 -08:00
Mitchell Hashimoto
25f12080cb terminal: bounds check params in DCS passthrough entry (#11088)
When a DCS sequence has more than MAX_PARAMS parameters, entering
dcs_passthrough would write to params[params_idx] without a bounds
check, causing an out-of-bounds access. Add the same guard that
csi_dispatch already has.

Found by AFL fuzzing, test and fix produced by Codex.
2026-02-28 21:14:34 -08:00
Mitchell Hashimoto
12f43dfb7d fix(terminal): bounds check params in DCS passthrough entry
When a DCS sequence has more than MAX_PARAMS parameters, entering
dcs_passthrough would write to params[params_idx] without a bounds
check, causing an out-of-bounds access. Drop the entire DCS hook
when params overflow, consistent with how csi_dispatch handles it.

Found by AFL fuzzing.
2026-02-28 21:11:40 -08:00
Mitchell Hashimoto
149949190e Remove old "acceptance tests" (#11086)
We haven't used or run these in forever (literally like 3+ years).
They're just wasting cognitive space and confuse some users as to what
they're for. Remove them.
2026-02-28 14:45:16 -08:00
Mitchell Hashimoto
981901a011 Remove old "acceptance tests"
We haven't used or run these in forever (literally like 3+ years).
They're just wasting cognitive space and confuse some users as to what
they're for. Remove them.
2026-02-28 14:37:23 -08:00
Mitchell Hashimoto
b40404b0d9 macOS: fix for Cmd+W window position/size restoration (#11070)
I'd like to contribute a fix for an issue I found regarding how macOS
window restoration works when a window is closed via Cmd+W (leaving the
app active).

Currently, the position cascades down and to the right on every reopen,
and size explicitly resets. Also, explicit `window-position-x/y` configs
get ignored on first launch.

I've diagnosed the issues:
1. In `TerminalWindow.swift`, `setInitialWindowPosition` relies on the
`TerminalController` which isn't present during `awakeFromNib`. I moved
the `screen.origin` calculation directly into the window class to ensure
fixed coordinates are respected immediately.
2. In `TerminalController.swift`, I consolidated the window spawning
cascade logic into a new `applyCascade(to:hasFixedPos:)` helper. It now
only calls `cascadeTopLeft` if `TerminalController.all.count > 1`
(meaning another window is active) and fixed coords aren't set. If it's
the only window, it anchors exactly where `LastWindowPosition` placed
it.
3. In `LastWindowPosition.swift`, I updated the `save` and `restore`
logic to persist the full `window.frame` (origin + size) instead of just
the origin.

*Disclosure: I used Cursor (Tab) to assist in navigating the codebase
and formatting the Swift code, but I fully understand the AppKit
lifecycle changes and edge cases I'm proposing.*

I have the commit locally formatted with `swiftlint` and ready to push!
2026-02-28 14:10:51 -08:00
Abdurrahman
0d5b9d554c Update macos/Sources/Features/Terminal/TerminalController.swift
apply reviewer suggestion for cascading

Co-authored-by: Lukas <134181853+bo2themax@users.noreply.github.com>
2026-02-28 18:02:40 +01:00
ghostty-vouch[bot]
889a945f74 Update VOUCHED list (#11078)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/11076#discussioncomment-15955432)
from @jcollie.

Vouch: @DiaaEddin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-28 15:17:15 +00:00
Jeffrey C. Ollie
14166bc84c Rename ko.po back to ko_KR.po (#11074)
While it was renamed from `ko_KR.UTF-8.po` to `ko.po` in #10976,
@uhojin, a Korean locale maintainer, [notes] that “ko_KR [*South*
Korean] makes more sense in locale context just to avoid any potential
confusion between 한국어 vs 조선어”.

Despite `ko_KP` (North Korean) not being present in glibc (as of version
2.43), and the ISO639 maintainers [expressing disapproval of `ko_KP`],
it is possible opinions may change in the future, and individual
opinions may be contested—disambiguating doesn't hurt.

Requesting a review from all involved parties; I wish you ***all* opine
before merging**.

[notes]:
https://github.com/ghostty-org/ghostty/pull/10976#discussion_r2861424171
[expressing disapproval of `ko_KP`]:
https://github.com/ghostty-org/ghostty/pull/10976#discussion_r2861359240
2026-02-28 02:49:23 -06:00
Kat
de62821973 Rename ko.po back to ko_KR.po.
While it was renamed from ko_KR.UTF-8.po to ko.po in #10976, @uhojin,
a Korean locale maintainer, notes [1] that “ko_KR [*South* Korean] makes
more sense in locale context just to avoid any potential confusion
between 한국어 vs 조선어”.

Despite ko_KP (North Korean) not being present in glibc (as of version
2.43), and the ISO639 maintainers expressing disapproval of ko_KP [2],
it is possible opinions may change in the future, and individual
opinions may be contested—disambiguating doesn't hurt.

[1]: https://github.com/ghostty-org/ghostty/pull/10976#discussion_r2861424171
[2]: https://github.com/ghostty-org/ghostty/pull/10976#discussion_r2861359240
2026-02-28 19:00:35 +11:00
Jeffrey C. Ollie
ee0e0ae3dd Rename pt.po back to pt_BR.po (#11073)
Follow-up to #10976.

Portugal exists! [Wikipedia notes it] to be the main other dialect.
There's already a PR for `pt_PT` support too: #9078.

[Wikipedia notes it]: https://en.wikipedia.org/wiki/Portuguese_dialects
2026-02-28 01:48:09 -06:00
Kat
9192276d3e Rename pt.po back to pt_BR.po.
Portugal exists! Wikipedia notes [1] it to be the main other dialect.
There's already a PR for pt_PT support too:
https://github.com/ghostty-org/ghostty/pull/9078.

It was renamed from pt_BR.UTF-8.po to pt.po in #10976.

[1]: https://en.wikipedia.org/wiki/Portuguese_dialects
2026-02-28 17:43:08 +11:00
ghostty-vouch[bot]
6d6dc9a114 Update VOUCHED list (#11071)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/11070#issuecomment-3976278687)
from @mitchellh.

Vouch: @abdurrahmanski

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-28 03:52:52 +00:00
A-AKB
6e622f8c75 fix(macos): extract window cascade logic into helper function 2026-02-28 01:43:00 +01:00
A-AKB
0db32ab9a8 macos: fix window size/position restoration on Cmd+W close
This fixes two overlapping issues regarding window positioning and Cmd+W window closures on macOS:

1. `window-position-x` and `window-position-y` coordinates were being ignored on initial launch because `TerminalWindow.setInitialWindowPosition` depended on the `TerminalController`, which isn't fully attached during `awakeFromNib`. This logic was moved so explicit coordinates are correctly enforced.
2. When closing a window via Cmd+W (leaving the app active), reopening the window would continuously cascade down and to the right rather than restoring to the previous position. It now checks if there are other windows open before cascading.
3. `LastWindowPosition` was updated to save both the frame origin and size (width/height), ensuring that restoring a closed window correctly mimics native AppKit State Restoration size behaviors while honoring explicit configurations.
2026-02-28 01:34:18 +01:00
trag1c
71cb9debb9 Fix a few typos (#11068) 2026-02-27 22:27:04 +01:00