Commit Graph

12787 Commits

Author SHA1 Message Date
Ravi Chandra
e70ae28fa3 terminal: add semi-colon character to word boundary list 2025-10-07 18:16:06 +13:00
Mitchell Hashimoto
67ece53423 lib-vt: begin paste utilities exports starting with safe paste (#9068) 2025-10-06 21:13:54 -07:00
Mitchell Hashimoto
bf9f025aec lib-vt: begin paste utilities exports starting with safe paste 2025-10-06 21:09:28 -07:00
Mitchell Hashimoto
5ece02fa76 lib-vt: split header to be more consumable (#9067)
No functionality changes. This just splits our header up.

Mostly driven by AI, hand reviewed:
https://ampcode.com/threads/T-c3f3e668-448b-4aec-9bac-a230b1d2b3c0
2025-10-06 21:06:27 -07:00
Mitchell Hashimoto
725203d494 lib-vt: split header to be more consumable 2025-10-06 20:48:49 -07:00
Jeffrey C. Ollie
3d1977ca43 osc: parse additional OSC 133 options (#9059)
OSC 133;A can have:

- special_key
- click_events

OSC 133;C can have:

- cmdline
- cmdline_url

Notably, they are in use by `fish`. Not sure what other shells currently
use these options.

Note that the options are only parsed. Nothing further is done with them
at this point.
2025-10-06 16:01:34 -05:00
Jeffrey C. Ollie
323dc54d46 fix custom-shader writergate breakage (#9061)
Fixes: #9060
2025-10-06 15:17:45 -05:00
Jeffrey C. Ollie
f72bbb5038 fix custom-shader writergate breakage
Fixes: #9060
2025-10-06 15:03:25 -05:00
Jeffrey C. Ollie
debdf6bf03 osc: parse additional OSC 133 options
OSC 133;A can have:

- special_key
- click_events

OSC 133;C can have:

- cmdline
- cmdline_url

Notably, they are in use by `fish`. Not sure what other shells currently
use these options.

Note that the options are only parsed. Nothing further is done with them
at this point.
2025-10-06 14:52:09 -05:00
Mitchell Hashimoto
39d3af469e update to the latest zf (#9051) 2025-10-06 11:42:13 -07:00
Mitchell Hashimoto
16026f3023 apprt/gtk: only close with no windows active if close delay is off (#9053)
Fixes #9052
2025-10-06 09:19:33 -07:00
Mitchell Hashimoto
e1e5bfc096 apprt/gtk: only close with no windows active if close delay is off
Fixes #9052
2025-10-06 09:17:16 -07:00
Mitchell Hashimoto
e4f0c366ff lib-vt docs: add etags to the pages 2025-10-06 08:48:57 -07:00
Mitchell Hashimoto
d7b9ce76a6 typos 2025-10-06 08:47:02 -07:00
Mitchell Hashimoto
ffbdfbd1e6 prettier 2025-10-06 08:45:25 -07:00
Mitchell Hashimoto
9194d6c496 doxygen: integrate examples into documentation 2025-10-06 08:44:47 -07:00
Mitchell Hashimoto
972dc94386 gtk: use std.Io.Writer to generate runtime CSS (#9050) 2025-10-06 08:30:23 -07:00
Mitchell Hashimoto
48d5fc925f doxygen: better scrollbar styling 2025-10-06 08:28:24 -07:00
Mitchell Hashimoto
992e9e2a6e doxygen: mobile styling 2025-10-06 08:25:44 -07:00
Jeffrey C. Ollie
76d9d731f0 update to the latest zf 2025-10-06 09:53:42 -05:00
Jeffrey C. Ollie
d2ee80bc49 gtk: use std.Io.Writer to generate runtime CSS 2025-10-06 09:39:50 -05:00
Mitchell Hashimoto
86421c9e09 lib-vt: trying to fix up hosted docs 2025-10-05 20:36:22 -07:00
Mitchell Hashimoto
21d545c3b4 doxygen prettier 2025-10-05 20:28:37 -07:00
Mitchell Hashimoto
6ef0be7580 libghostty website: update to use arch for doxygen for latest 2025-10-05 20:26:18 -07:00
Mitchell Hashimoto
f3c1357337 lib-vt: fix dockerfile to include assets for web 2025-10-05 20:18:48 -07:00
Mitchell Hashimoto
a73a67d252 doxygen improvements 2025-10-05 20:16:42 -07:00
Mitchell Hashimoto
ed65401bf8 osc: reorder osc tests and name them consistently (#9042)
No changes in the tests were made, but reordering them and naming them
consistently will makes finding tests easier (there are a LOT).
2025-10-05 19:51:07 -07:00
Mitchell Hashimoto
3fe1828e5e freebsd: fix CI for Zig 0.15 and enable FreeBSD 15.0 (#9039) 2025-10-05 19:50:47 -07:00
Mitchell Hashimoto
0425e5492e build(deps): bump softprops/action-gh-release from 2.3.3 to 2.3.4 (#9041)
Bumps
[softprops/action-gh-release](https://github.com/softprops/action-gh-release)
from 2.3.3 to 2.3.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/softprops/action-gh-release/releases">softprops/action-gh-release's
releases</a>.</em></p>
<blockquote>
<h2>v2.3.4</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Bug fixes 🐛</h3>
<ul>
<li>fix(action): handle 422 already_exists race condition by <a
href="https://github.com/stephenway"><code>@​stephenway</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/665">softprops/action-gh-release#665</a></li>
</ul>
<h3>Other Changes 🔄</h3>
<ul>
<li>chore(deps): bump actions/setup-node from 4.4.0 to 5.0.0 in the
github-actions group by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/656">softprops/action-gh-release#656</a></li>
<li>chore(deps): bump <code>@​types/node</code> from 20.19.11 to
20.19.13 in the npm group by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/655">softprops/action-gh-release#655</a></li>
<li>chore(deps): bump vite from 7.0.0 to 7.1.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/657">softprops/action-gh-release#657</a></li>
<li>chore(deps): bump the npm group across 1 directory with 2 updates by
<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/662">softprops/action-gh-release#662</a></li>
<li>chore(deps): bump the npm group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/666">softprops/action-gh-release#666</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/softprops/action-gh-release/compare/v2...v2.3.4">https://github.com/softprops/action-gh-release/compare/v2...v2.3.4</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md">softprops/action-gh-release's
changelog</a>.</em></p>
<blockquote>
<h2>2.3.4</h2>
<h2>What's Changed</h2>
<h3>Bug fixes 🐛</h3>
<ul>
<li>fix(action): handle 422 already_exists race condition by <a
href="https://github.com/stephenway"><code>@​stephenway</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/665">softprops/action-gh-release#665</a></li>
</ul>
<h3>Other Changes 🔄</h3>
<ul>
<li>dependency updates</li>
</ul>
<h2>2.3.3</h2>
<h2>What's Changed</h2>
<h3>Exciting New Features 🎉</h3>
<ul>
<li>feat: add input option <code>overwrite_files</code> by <a
href="https://github.com/asfernandes"><code>@​asfernandes</code></a> in
<a
href="https://redirect.github.com/softprops/action-gh-release/pull/343">softprops/action-gh-release#343</a></li>
</ul>
<h3>Other Changes 🔄</h3>
<ul>
<li>dependency updates</li>
</ul>
<h2>2.3.2</h2>
<ul>
<li>fix: revert fs <code>readableWebStream</code> change</li>
</ul>
<h2>2.3.1</h2>
<h3>Bug fixes 🐛</h3>
<ul>
<li>fix: fix file closing issue by <a
href="https://github.com/WailGree"><code>@​WailGree</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/629">softprops/action-gh-release#629</a></li>
</ul>
<h2>2.3.0</h2>
<ul>
<li>Migrate from jest to vitest</li>
<li>Replace <code>mime</code> with <code>mime-types</code></li>
<li>Bump to use node 24</li>
<li>Dependency updates</li>
</ul>
<h2>2.2.2</h2>
<h2>What's Changed</h2>
<h3>Bug fixes 🐛</h3>
<ul>
<li>fix: updating release draft status from true to false by <a
href="https://github.com/galargh"><code>@​galargh</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/316">softprops/action-gh-release#316</a></li>
</ul>
<h3>Other Changes 🔄</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="62c96d0c4e"><code>62c96d0</code></a>
release 2.3.4</li>
<li><a
href="7dc9b8ac0f"><code>7dc9b8a</code></a>
fix(action): handle 422 already_exists race condition (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/665">#665</a>)</li>
<li><a
href="0f0e0b98e9"><code>0f0e0b9</code></a>
chore(deps): bump the npm group with 3 updates (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/666">#666</a>)</li>
<li><a
href="97d42c1b50"><code>97d42c1</code></a>
chore(deps): bump the npm group across 1 directory with 2 updates (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/662">#662</a>)</li>
<li><a
href="19cd0bcd2b"><code>19cd0bc</code></a>
chore(deps): bump vite from 7.0.0 to 7.1.5 (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/657">#657</a>)</li>
<li><a
href="5d1b0b1164"><code>5d1b0b1</code></a>
chore(deps): bump <code>@​types/node</code> from 20.19.11 to 20.19.13 in
the npm group (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/655">#655</a>)</li>
<li><a
href="f6021cf9a4"><code>f6021cf</code></a>
chore(deps): bump actions/setup-node in the github-actions group (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/656">#656</a>)</li>
<li>See full diff in <a
href="6cbd405e2c...62c96d0c4e">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=softprops/action-gh-release&package-manager=github_actions&previous-version=2.3.3&new-version=2.3.4)](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-10-05 19:50:05 -07:00
Mitchell Hashimoto
b5661cc887 linux cgroup: fix initialization (#9043)
`std.Io.Reader.readAlloc` will fail if it can't read all of the bytes
asked for, so use `File.readToEndAlloc` instead.
2025-10-05 19:49:50 -07:00
Jeffrey C. Ollie
d9de5909d9 linux cgroup: also fix controllers()
This fix was found by Claude Code, but I manually reviewed this change
and removed extraneous changes made by the AI tool.

Co-authored-by: moderation <michael@sooper.org>
2025-10-05 21:03:14 -05:00
Jeffrey C. Ollie
a249b3da3a linux cgroup: fix initialization 2025-10-05 20:46:48 -05:00
Jeffrey C. Ollie
f03344b1c6 osc: reorder osc tests and name them consistently 2025-10-05 19:49:21 -05:00
dependabot[bot]
34cb77c9f2 build(deps): bump softprops/action-gh-release from 2.3.3 to 2.3.4
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.3.3 to 2.3.4.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](6cbd405e2c...62c96d0c4e)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.3.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 00:10:09 +00:00
Jeffrey C. Ollie
67357c663d freebsd: add a timeout to the freebsd job 2025-10-05 19:08:20 -05:00
Jeffrey C. Ollie
d6ef048cd7 freebsd: fix CI for Zig 0.15 and enable FreeBSD 15.0 2025-10-05 18:47:54 -05:00
Mitchell Hashimoto
c5ea4a8079 libghostty: use Arch for docs container to get later Doxygen 2025-10-05 15:19:20 -07:00
Mitchell Hashimoto
aeb6647aa6 libghostty docs: use latest Doxygen 2025-10-05 15:04:51 -07:00
Mitchell Hashimoto
fd0851bae7 lib-vt: update documentation with more examples 2025-10-05 14:54:58 -07:00
Mitchell Hashimoto
48f5e4a16d lib-vt: expose key encoding as a C API (#9040)
Example in `example/c-vt-key-encode`, but here is an abridged version:

```c
#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <ghostty/vt.h>

int main() {
  GhosttyKeyEncoder encoder;
  GhosttyResult result = ghostty_key_encoder_new(NULL, &encoder);
  assert(result == GHOSTTY_SUCCESS);

  ghostty_key_encoder_setopt(encoder, GHOSTTY_KEY_ENCODER_OPT_KITTY_FLAGS, &(uint8_t){GHOSTTY_KITTY_KEY_ALL});

  GhosttyKeyEvent event;
  result = ghostty_key_event_new(NULL, &event);
  assert(result == GHOSTTY_SUCCESS);
  ghostty_key_event_set_action(event, GHOSTTY_KEY_ACTION_RELEASE);
  ghostty_key_event_set_key(event, GHOSTTY_KEY_CONTROL_LEFT);
  ghostty_key_event_set_mods(event, GHOSTTY_MODS_CTRL);

  char buf[128];
  size_t written = 0;
  result = ghostty_key_encoder_encode(encoder, event, buf, sizeof(buf), &written);
  assert(result == GHOSTTY_SUCCESS);

  ghostty_key_event_free(event);
  ghostty_key_encoder_free(encoder);
  return 0;
}
```
2025-10-05 14:44:55 -07:00
Mitchell Hashimoto
61fe78c1d3 lib-vt: expose key encoding as a C API 2025-10-05 14:40:20 -07:00
Mitchell Hashimoto
fa3bc416ab fix:use builtin memmove (#9033) 2025-10-05 08:18:08 -07:00
NikoMalik
ff3a6d0650 fix: do not remove libc memmove until performance comparisons have been conducted 2025-10-05 17:35:58 +03:00
NikoMalik
1c0282d658 fix:use builtin memmove 2025-10-05 12:30:51 +03:00
Mitchell Hashimoto
31ba6534cf input: use std.Io.Writer for key encoder, new API, expose via libghostty (#9030)
This modernizes `KeyEncoder` to a new `std.Io.Writer`-based API.
Additionally, instead of a single struct, it is now an `encode` function
that takes a series of more focused options. This is more idiomatic Zig
while also making it easier to expose via libghostty-vt.

libghostty-vt Zig module also gains access to key encoding APIs. The C
APIs will follow another time.

Converting the KeyEncoder tests was done using AI:
https://ampcode.com/threads/T-9731bbdc-e0a9-41ad-9404-2b781a66ee39
Reviewed and understood.
2025-10-04 20:24:42 -07:00
Mitchell Hashimoto
44496df899 input: use std.Io.Writer for key encoder, new API, expose via libghostty
This modernizes `KeyEncoder` to a new `std.Io.Writer`-based API.
Additionally, instead of a single struct, it is now an `encode` function
that takes a series of more focused options. This is more idiomatic Zig
while also making it easier to expose via libghostty-vt.

libghostty-vt also gains access to key encoding APIs.
2025-10-04 20:19:39 -07:00
Mitchell Hashimoto
abae5422bf Update iTerm2 colorschemes (#9029)
Upstream release:
https://github.com/mbadolato/iTerm2-Color-Schemes/releases/tag/release-20251002-142451-4a5043e
2025-10-04 17:17:27 -07:00
mitchellh
cef99250a7 deps: Update iTerm2 color schemes 2025-10-05 00:16:06 +00:00
Mitchell Hashimoto
503a25653f build: framegen can use self-hosted (#9021)
This was a red herring when I was doing the 0.15 port. It works with
self-hosted just fine.
2025-10-04 14:08:42 -07:00
Mitchell Hashimoto
e1568118ee Move paste encoding to the input package, test, optimize away one alloc (#9028)
This moves our paste logic to `src/input` in preparation for exposing
this as part of libghostty-vt. This yields an immediate benefit of unit
tests for paste encoding.

Additionally, we were able to remove one allocation on every unbracketed
paste path unless the input specifically contains a newline. Unlikely to
be noticable, but nice.

NOTE: This also includes one change in behavior: we no longer encode
`\r\n` and a single `\r`, but as a duplicate `\r\r`. This matches xterm
behavior and I don't think will result in any issues since duplicate
carriage returns should do nothing in well-behaved terminals.
2025-10-04 14:08:26 -07:00