Commit Graph

12844 Commits

Author SHA1 Message Date
Jeffrey C. Ollie
c8e317b60f core: handle utf-8 bom in config files
If a UTF-8 byte order mark starts a config file, it should be ignored.
This also refactors config file loading a bit to reduce redundant code
and to make it possible to test loading config from a file.

Fixes #9490
2025-11-06 10:59:26 -06:00
Mitchell Hashimoto
9786d0ea73 terminal: keypad variation sequences should respect VS16 (#9502)
This fixes the VS16 issues found in this test:
https://ucs-detect.readthedocs.io/sw_results/ghostty.html#ghostty This
is also a more robust way to handle VS15/16 in general.

This commit also changes our propeties to be a packed struct which
reduces its size from 4 bytes to 1 and likewise drops our unicode table
size 4x. This isn't as big as it seems, since this only affects stage3
of our LUT which goes from 108 bytes to 27 bytes.

## Before

<img width="1996" height="1740" alt="CleanShot 2025-11-06 at 07 08
20@2x"
src="https://github.com/user-attachments/assets/79850071-a2d5-4d6d-a76b-7ebf355b4480"
/>

## After

<img width="1996" height="1740" alt="CleanShot 2025-11-06 at 07 08
02@2x"
src="https://github.com/user-attachments/assets/44f809f2-93cd-4c97-8f42-46cd8f72ec8b"
/>
2025-11-06 08:20:28 -07:00
Mitchell Hashimoto
3d58dc51c9 terminal: keypad variation sequences should respect VS16
This fixes the VS16 issues found in this test:
https://ucs-detect.readthedocs.io/sw_results/ghostty.html#ghostty
This is also a more robust way to handle VS15/16 in general. 

This commit also changes our propeties to be a packed struct which
reduces its size from 4 bytes to 1 and likewise drops our unicode table
size 4x.
2025-11-06 07:05:57 -08:00
Mitchell Hashimoto
923bde72d8 unicode: update uucode, force emoji modifiers width 2 as standalone (#9493)
This updates uucode. As part of this, the wcwidth implementation was
updated (in uucode) to make emoji modifiers width ZERO. But if they're
standalone, we want them as width 2.

So this also contains a change to force them as width 2 for our width
calculation. This only matters for standalone emoji modifiers, because
when they form a valid grapheme we don't use this width calculation.
2025-11-05 16:43:03 -07:00
Mitchell Hashimoto
631c58a302 unicode: update uucode, force emoji modifiers width 2 as standalone
This updates uucode. As part of this, the wcwidth implementation was
updated (in uucode) to make emoji modifiers width ZERO. But if they're
standalone, we want them as width 2.

So this also contains a change to force them as width 2 for our width
calculation. This only matters for standalone emoji modifiers, because
when they form a valid grapheme we don't use this width calculation.
2025-11-05 14:57:48 -08:00
Mitchell Hashimoto
d43be63851 Add an example for palette configuration (#9473)
I found this syntax a bit confusing when I first read it, so I thought
it would be helpful for the next person to add a short example.
2025-11-05 06:34:34 -08:00
Avery Mcnab
13d5f0c503 Add an example for palette configuration
I found this syntax a bit confusing when I first read it, so I thought it would be helpful for the next person to add a short example.
2025-11-04 15:02:03 +00:00
Mitchell Hashimoto
bbaee5e0a0 build(deps): bump namespacelabs/nscloud-cache-action from 1.2.20 to 1.2.21 (#9460)
Bumps
[namespacelabs/nscloud-cache-action](https://github.com/namespacelabs/nscloud-cache-action)
from 1.2.20 to 1.2.21.
<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.2.21</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: <code>bun</code> &amp; <code>deno</code> cache mode by <a
href="https://github.com/rcrowe"><code>@​rcrowe</code></a> in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/45">namespacelabs/nscloud-cache-action#45</a></li>
<li>Support <code>golangci-lint</code> caching by <a
href="https://github.com/rcrowe"><code>@​rcrowe</code></a> in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/46">namespacelabs/nscloud-cache-action#46</a></li>
<li>Add Mise cache mode by <a
href="https://github.com/rcrowe"><code>@​rcrowe</code></a> in <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/pull/47">namespacelabs/nscloud-cache-action#47</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/namespacelabs/nscloud-cache-action/compare/v1...v1.2.21">https://github.com/namespacelabs/nscloud-cache-action/compare/v1...v1.2.21</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="446d8f3905"><code>446d8f3</code></a>
Merge pull request <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/47">#47</a>
from rcrowe/mise-support</li>
<li><a
href="613cebb068"><code>613cebb</code></a>
Add Mise cache mode</li>
<li><a
href="7dddb61a4c"><code>7dddb61</code></a>
Merge pull request <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/46">#46</a>
from rcrowe/cache-mode-golangci-lint</li>
<li><a
href="2de3d9c86f"><code>2de3d9c</code></a>
Search for directory output</li>
<li><a
href="76fbc4cf47"><code>76fbc4c</code></a>
Build dist</li>
<li><a
href="74129e9b23"><code>74129e9</code></a>
Actions job</li>
<li><a
href="99c7dbff89"><code>99c7dbf</code></a>
Support golangci-lint caching</li>
<li><a
href="9ad1d3f484"><code>9ad1d3f</code></a>
Merge pull request <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/45">#45</a>
from rcrowe/cache-mode-deno</li>
<li><a
href="a1d88d2acc"><code>a1d88d2</code></a>
Support bun cache mode</li>
<li><a
href="93e08c88b5"><code>93e08c8</code></a>
Support deno cache mode</li>
<li>Additional commits viewable in <a
href="d93899d984...446d8f3905">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.2.20&new-version=1.2.21)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-11-03 11:10:29 -08:00
dependabot[bot]
551c1e68e0 build(deps): bump namespacelabs/nscloud-cache-action
Bumps [namespacelabs/nscloud-cache-action](https://github.com/namespacelabs/nscloud-cache-action) from 1.2.20 to 1.2.21.
- [Release notes](https://github.com/namespacelabs/nscloud-cache-action/releases)
- [Commits](d93899d984...446d8f3905)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 00:07:29 +00:00
Mitchell Hashimoto
329aa7d334 nix: don't use deprecated pkgs.system (#9458)
'system' has been renamed to/replaced by 'stdenv.hostPlatform.system'

https://github.com/NixOS/nixpkgs/pull/456527
2025-11-02 14:29:37 -08:00
Mitchell Hashimoto
0eeae265aa apprt/gtk: (clipboard) add X11 atoms and extra MIME types for text content (#9456)
This adds the `UTF8_STRING` atom and explicit UTF-8 character set MIME
type (`text/plain;charset=utf-8`) to text content when being sent to the
clipboard under the new multipart support.

This fixes clipboard support under X11 particularly, which generally
looks for the `UTF8_STRING` atom when looking for text content. This can
be verified with `xclip -out -verbose`, or trying to do things like
paste in Firefox.

I've noted that there's a number of other older atoms that exist, but
I've refrained from adding them for now. Kitty only seems to set
`UTF8_STRING` and I've had a hard time finding consensus on what exactly
is the correct set otherwise.
2025-11-02 13:51:10 -08:00
Caleb Norton
d4f474bb35 nix: don't use deprecated pkgs.system
'system' has been renamed to/replaced by 'stdenv.hostPlatform.system'
https://github.com/NixOS/nixpkgs/pull/456527
2025-11-02 13:21:12 -06:00
Chris Marchesi
e7c68142e3 apprt/gtk: (clipboard) add X11 atoms, extra MIME types for text content
This adds the UTF8_STRING atom and explicit UTF-8 character set MIME
type (text/plain;charset=utf-8) to text content when being sent to the
clipboard under the new multipart support.

This fixes clipboard support under X11 particularly, which generally
looks for the UTF8_STRING atom when looking for text content. This can be
verified with xclip -out -verbose, or trying to do things like paste in
Firefox.

I've noted that there's a number of other older atoms that exist, but
I've refrained from adding them for now. Kitty only seems to set
UTF8_STRING and I've had a hard time finding consensus on what exactly
is the correct set otherwise.
2025-11-02 11:19:10 -08:00
Mitchell Hashimoto
955087f5f2 i18n: prefer using ellipsis over three dots (#9455)
After skimming through the norwegian bokmål translation
(https://github.com/ghostty-org/ghostty/blob/main/po/nb_NO.UTF-8.po) I
noticed a inconsistent use of three dots/ellipses. On [line
93](https://github.com/ghostty-org/ghostty/blob/main/po/nb_NO.UTF-8.po#L93),
three dots (`...`) are present where the actual ellipsis sign (`…`)
should be used instead. As mentioned in [this discord
comment](https://discord.com/channels/1005603569187160125/1349894806180204625/1434515563496996988).

This is not a big "problem" by itself, but looking at the english
translation and the rest of norwegian ones, you'll see that they all use
the ellipsis sign. (e.g. `Execute a command…`, `Endre tittel…`)

This is just a simple one-liner replacing the three periods with an
ellipsis sign.

cc @uzaaft
2025-11-02 07:14:38 -08:00
Mitchell Hashimoto
aa5ae095b0 Update iTerm2 colorschemes (#9450)
Upstream release:
https://github.com/mbadolato/iTerm2-Color-Schemes/releases/tag/release-20251027-150540-8f50c1d
2025-11-02 07:09:48 -08:00
realguse
f6faf2a515 chore(i18n): prefer using ellipsis over three dots 2025-11-02 14:52:54 +01:00
mitchellh
9e2caedb7d deps: Update iTerm2 color schemes 2025-11-02 00:15:16 +00:00
Mitchell Hashimoto
765ee68429 apprt/gtk: set multiple content types for clipboard ops (#9431)
This supports the new `setClipboard` parameter that may provide data in
multiple formats, allowing us to copy rich text to/from the clipboard as
well as other types in the future.

This all fixes a memory leak on all clipboard ops that snuck through.
2025-10-31 10:58:12 -07:00
Mitchell Hashimoto
46db1cfd8f apprt/gtk: set multiple content types for clipboard ops
This supports the new `setClipboard` parameter that may provide data in
multiple formats, allowing us to copy rich text to/from the clipboard as
well as other types in the future.
2025-10-31 10:53:10 -07:00
Mitchell Hashimoto
15bfdcb41e input: write_*_file actions take an optional format (#9428)
Fixes #9398

This is fully backwards compatible. Example:
`write_screen_file:open,html`
2025-10-31 09:52:13 -07:00
Mitchell Hashimoto
901708e8da input: write_*_file actions take an optional format
Fixes #9398
2025-10-31 09:49:59 -07:00
Mitchell Hashimoto
24b9778432 input: add more copy formatted options to the command palette 2025-10-31 08:21:16 -07:00
Mitchell Hashimoto
7d6cd12fb3 terminal: emit non-ASCII characters as Unicode codepoints for HTML (#9427)
Fixes #9426

Since we can't set the meta charset tag since we emit partial HTML, we
use codepoint entities like `&#123;` for non-ASCII characters to ensure
proper rendering.
2025-10-31 08:19:41 -07:00
Mitchell Hashimoto
05d2f881b6 terminal: emit non-ASCII characters as Unicode codepoints for HTML
Fixes #9426

Since we can't set the meta charset tag since we emit partial HTML, we
use codepoint entities like `&#123;` for non-ASCII characters to
ensure proper rendering.
2025-10-31 08:15:25 -07:00
Lukas
b043623bb2 macos: Fix documentView padding calculations (#9423)
Fixes #9420 

The problem was ultimately that the padding calculations assumed that
the total vertical padding is always less than one cell height (just
doing `fmod(contentHeight, cellHeight)` instead of the more careful
`contentHeight - scrollbar.len * cellHeight`). This is not at all true,
and as a result, the calculated document height was often a cell height
short of what it should be.

For similar reasons, we shouldn't rely on `fmod`-based padding update
calculations during relayouting. This PR takes the proper approach of
saving and reusing the current scrollbar state to calculate the correct
document height on every layout. As a bonus, this removes the flickering
scrollbar during resize that I complained about in #9296.
2025-10-31 11:32:37 +01:00
Daniel Wennberg
951374cd1c Fix documentView padding calculations 2025-10-31 00:39:03 -07:00
Mitchell Hashimoto
bc0f5e4d57 Copy formatted text to clipboard with plain, make it configurable (#9418)
Fixes #9397 

This makes `copy_to_clipboard` take an optional parameter with the
format to copy. **The default has changed to `mixed`,** which will set
multiple content types on the clipboard allowing the OS or target
application to choose what they prefer. In this case, we set both
`text/plain` and `text/html`.

This only includes the macOS implementation. The GTK side still needs to
be done, but is likely trivial to do.


https://github.com/user-attachments/assets/b1b2f5cd-d59a-496e-bb77-86a60571ed7f
2025-10-30 15:17:16 -07:00
Mitchell Hashimoto
5c1f036613 macos: assert only one text-plain gets written to clipboard 2025-10-30 15:16:15 -07:00
Mitchell Hashimoto
54fe54fe37 apprt/gtk: fix build errors 2025-10-30 14:43:31 -07:00
Mitchell Hashimoto
f3352dd90b core: copy the proper format to the clipboard as configured 2025-10-30 14:36:32 -07:00
Mitchell Hashimoto
9a198b47a0 apprt/gtk: support new set clipboard API 2025-10-30 14:11:00 -07:00
Mitchell Hashimoto
26bdb12f64 core: update Surface to use setClipboard 2025-10-30 14:08:29 -07:00
Mitchell Hashimoto
0f1c46e4a4 macos: support setting multiple clipboard content types 2025-10-30 14:01:58 -07:00
Mitchell Hashimoto
df037d75a6 copy_to_clipboard format types 2025-10-30 13:40:32 -07:00
Mitchell Hashimoto
77b038dcb6 update README 2025-10-30 13:14:23 -07:00
Mitchell Hashimoto
038cdde334 terminal: formatters now emit background/foreground information (#9414)
This allows the full terminal style to be copied, except for the cursor:

<img width="1136" height="660" alt="image"
src="https://github.com/user-attachments/assets/448d7125-d4fd-477b-9a9b-96176d7fae56"
/>
2025-10-30 10:44:08 -07:00
Mitchell Hashimoto
83a4f32a14 terminal: formatter improvements for color handling 2025-10-30 10:39:46 -07:00
Mitchell Hashimoto
4c504560d4 terminal: move bg, fg, cursor color state into Terminal (#9412)
This moves the bg, fg, cursor color state into the `Terminal` struct,
including all default and override handling. I've rewritten our color
palette handling so that overrides, defaults, resets, etc are all
handled by the terminal package. I've added much more unit test
coverage.

This has various benefits:

* libghostty now handles OSC and Kitty color operations
* formatters can be aware of all of these colors (not implemented in
this PR)
* renderer has way less inter-thread messages
* renderer uses less memory 
* termio stream handler uses less memory and becomes simpler
* override logic, changing defaults can all be unit tested
* we have unit tests for kitty color operations end-to-end now (cc
@jcollie heyo!)

There's a ton of risk on this PR too. There's a lot of really tiny
conditionals EVERYWHERE and I'm sure I got at least one wrong. We'll let
this bake in tip to find those, I'm sure they're minor and will show up
as just the wrong color somewhere.

**AI disclosure:** Amp wrote many of the tests. I did all the
implementation.
2025-10-30 10:15:33 -07:00
Mitchell Hashimoto
799e4bca50 example/zig-formatter: fix build for new palette API 2025-10-30 10:07:44 -07:00
Mitchell Hashimoto
450155f150 zig fmt 2025-10-30 10:06:13 -07:00
Mitchell Hashimoto
27a98123a0 terminal: readonly stream can update more colors now 2025-10-30 09:58:56 -07:00
Mitchell Hashimoto
2daecd94a5 renderer: use terminal color state, remove color messages 2025-10-30 09:52:39 -07:00
Mitchell Hashimoto
77343bb06e terminal: move color state fully into the terminal for fg/bg/cursor 2025-10-30 09:33:21 -07:00
Mitchell Hashimoto
cabca0aca8 terminal: unify palette functionality into shared type DynamicPalette 2025-10-30 09:15:43 -07:00
Lukas
c7d5d1b9fc macOS: make text editor in clipboard confirmation non focusable (#9400)
With its being `focusable`(default), the first responder became the text
editor instead of the paste button.

This fixes the issue where one can't confirm with the keyboard.

This doesn't affect its selection.
2025-10-29 21:30:03 -07:00
Jon Parise
4818c2b896 cli: make the entire +ssh-cache cache path (#9403)
std.fs.makeDirAbsolute() only creates the last directory. We instead
need Dir.makePath() to make the entire path, including intermediate
directories.

This fixes the problem where a missing $XDG_STATE_HOME directory (e.g.
~/.local/state/) would prevent our ssh cache file from being created.

Fixes #9393
2025-10-29 21:29:40 -07:00
dependabot[bot]
5edf9aff50 build(deps): bump cachix/install-nix-action from 31.8.1 to 31.8.2 (#9405)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 31.8.1 to 31.8.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v31.8.2</h2>
<h2>What's Changed</h2>
<ul>
<li>nix: 2.32.1 -&gt; 2.32.2 by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>[bot]
in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/259">cachix/install-nix-action#259</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/cachix/install-nix-action/compare/v31.8.1...v31.8.2">https://github.com/cachix/install-nix-action/compare/v31.8.1...v31.8.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="456688f15b"><code>456688f</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/259">#259</a>
from cachix/create-pull-request/patch</li>
<li><a
href="0cacfe0f2a"><code>0cacfe0</code></a>
nix: 2.32.1 -&gt; 2.32.2</li>
<li>See full diff in <a
href="fd24c48048...456688f15b">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=31.8.1&new-version=31.8.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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-29 21:29:05 -07:00
Mitchell Hashimoto
4a88976ef9 example/zig-formatter: show how to use formatters from libghostty (#9407) 2025-10-29 21:28:52 -07:00
Mitchell Hashimoto
c0e483c49e terminal: HTML formatting (#9402)
This adds HTML formatting capabilities to the formatter package. HTML is
emitted as inline styles. For palette indexes, direct RGB is emitted if
we have access to a palette; otherwise, we fall back to CSS variables.

This isn't exposed to end users yet, but will enable copy as html
features. This is available in libghostty.

Fixes #9395

**AI disclosure:** I used AI (Amp) to help me write tests, but the
implementation was done manually. I reviewed everything.
2025-10-29 20:55:52 -07:00
Daniel Wennberg
e70ca0b9b5 Don't encode option as alt in modify other keys 2 (#9406)
There have been frequent reports of key encoding issues in vim and tmux
with version 1.2.3 on macOS: #9340, #9361, #9401,
https://discord.com/channels/1005603569187160125/1432413679806320772.

I think I found the culprit: the option modifier is always passed as alt
to the core, regardless of `macos-option-as-alt`. Since #9289, this
means that a key event where option was used (as option) for translation
is encoded as if it also has the alt modifier.

For example, consider the many European keyboard layouts where option+8
sends `[`. If `macos-option-as-alt = true`, Ghostty correctly intercepts
the option and encodes option+8 as alt+8 instead (that is,
`^[[27;3;56~`). But if `macos-option-as-alt = false`, Ghostty first
allows option to be used for translation, obtaining `[`, and then
encodes the key event as alt+[ (that is, `^[[27;3;91~`), rather than
just `[`.

Tweaking the test case from #9289, here's a quick way to see this: set
`macos-option-as-alt = left`, run
```
printf '\033[>4;2m'
cat
```
choose a European keyboard layout (e.g., Norwegian), and hit both
left-option+8 and right-option+8. The former inserts `^[[27;3;56~` in
all well-behaved terminals. The latter inserts `[` in other terminals,
but `^[[27;3;91~` in Ghostty.

Basically, while modify other keys 2 does require encoding consumed
modifiers, the option key is not one of the supported modifiers, and
should not be included (as alt or anything else) when
`macos-option-as-alt = false`.

This PR removes alts that were actually options when using modify other
keys 2.
2025-10-29 20:29:53 -07:00