Commit Graph

367 Commits

Author SHA1 Message Date
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
Mitchell Hashimoto
dc514c9e11 build: don't build OpenGL support into imgui on iOS 2026-02-26 10:31:21 -08:00
Jacob Sandlund
f53e4b43c4 Merge remote-tracking branch 'upstream/main' into grapheme-width-changes 2026-02-23 08:39:10 -05:00
Elias Andualem
e7cfb17d5a build: support 16kb page sizes for Android 15+ 2026-02-21 22:48:36 +08:00
Elias Andualem
bd9611650f build: add support for Android NDK path configuration 2026-02-21 21:17:09 +08:00
Jacob Sandlund
e06ac6d33e Force prepend to use wcwidth_standalone 2026-02-20 12:12:26 -05:00
Jacob Sandlund
bb9d37c09c Merge remote-tracking branch 'upstream/main' into grapheme-width-changes 2026-02-19 08:52:53 -05:00
Mitchell Hashimoto
85a631dd20 build: stylistic changes for libvt 2026-02-18 09:35:08 -08:00
Elias Andualem
20af48de96 build: enhance Darwin build configs for LLVM and SDK paths 2026-02-18 09:35:08 -08:00
Elias Andualem
44b7d34652 fix: add support for apple SDK paths in Darwin builds 2026-02-18 09:35:08 -08:00
David Matos
6d71f40907 Fix typo 2026-02-17 23:51:42 +01:00
David Matos
3779e469df Remove extra space 2026-02-17 23:48:16 +01:00
David Matos
1ec54be4d5 Add back comment 2026-02-17 23:46:50 +01:00
David Matos
4525dd57a0 Merge branch 'main' into localize-nautilus-script 2026-02-15 11:01:11 +01:00
Jacob Sandlund
6b2caf69db Merge remote-tracking branch 'upstream/main' into grapheme-width-changes 2026-01-27 09:44:55 -05:00
Jeffrey C. Ollie
9172f6c538 build: include comments on why '/' is removed 2026-01-26 14:43:54 -06:00
Jeffrey C. Ollie
7123877c9c build: don't allow / in branch names
This should fix CI failures like in PRs #10449 and #10450 that use
long automatically-generated branch names.
2026-01-26 14:36:31 -06:00
David Matos
d03b07415d remove comment 2026-01-22 12:06:39 +01:00
David Matos
c755720e17 Merge pot files 2026-01-22 12:00:53 +01:00
David Matos
4f0f464fb3 Merge branch 'main' into localize-nautilus-script 2026-01-21 14:28:01 +01:00
Mitchell Hashimoto
cb25c0a8ae build: libghostty-vt now depends on uucode directly
This doesn't add any real weight to it, we only need it for a type
definition. This fixes our example builds.
2026-01-20 10:18:47 -08:00
Mitchell Hashimoto
49b2b8d644 unicode: switch to uucode grapheme break to (mostly) match unicode spec (#9680)
This PR builds on https://github.com/ghostty-org/ghostty/pull/9678 ~so
the diff from there is included here (it's not possible to stack PRs
unless it's a PR against my own fork)--review that one first!~

This PR updates the `graphemeBreak` calculation to use `uucode`'s
`computeGraphemeBreakNoControl`, which has [tests in
uucode](215ff09730/src/x/grapheme.zig (L753))
that confirm it passes the `GraphemeBreakTest.txt` (minus some
exceptions).

Note that the `grapheme_break` (and `grapheme_break_no_control`)
property in `uucode` incorporates `emoji_modifier` and
`emoji_modifier_base`, diverging from UAX #29 but matching UTS #51. See
[this comment in
uucode](215ff09730/src/grapheme.zig (L420-L434))
for details.

The `grapheme_break_no_control` property and
`computeGraphemeBreakNoControl` both assume `control`, `cr`, and `lf`
have been filtered out, matching the current grapheme break logic in
Ghostty.

This PR keeps the `Precompute.data` logic mostly equivalent, since the
`uucode` `precomputedGraphemeBreak` lacks benchmarks in the `uucode`
repository (it was benchmarked in [the original PR adding `uucode` to
Ghostty](https://github.com/ghostty-org/ghostty/pull/8757)). Note
however, that due to `grapheme_break` being one bit larger than
`grapheme_boundary_class` and the new `BreakState` also being one bit
larger, the state jumps up by a factor of 8 (u10 -> u13), to 8KB.

## Benchmarks

~I benchmarked the old `main` version versus this PR for
`+grapheme-break` and surprisingly this PR is 2% faster (?). Looking at
the assembly though, I'm thinking something else might be causing that.
Once I get to the bottom of that I'll remove the below TODO and include
the benchmark results here.~

When seeing the speedup with `data.txt` and maybe a tiny speedup on
English wiki, I was surprised given the 1KB -> 8KB tables. Here's what
AI said when I asked it to inspect the assembly:
https://ampcode.com/threads/T-979b1743-19e7-47c9-8074-9778b4b2a61e, and
here's what it said when I asked it to predict the faster version:
https://ampcode.com/threads/T-3291dcd3-7a21-4d24-a192-7b3f6e18cd31

It looks like two loads got reordered and that put the load that
depended on stage1 -> stage2 -> stage3 second, "hiding memory latency".
So that makes the new one faster when looking up the `grapheme_break`
property. These gains go away with the Japanese and Arabic benchmarks,
which spend more time processing utf8, and may even have more grapheme
clusters too.

### with data.txt (200 MB ghostty-gen random utf8)

<img width="1822" height="464" alt="CleanShot 2025-11-26 at 08 42 03@2x"
src="https://github.com/user-attachments/assets/56d4ee98-21db-4eab-93ab-a0463a653883"
/>

### with English wiki dump

<img width="2012" height="506" alt="CleanShot 2025-11-26 at 08 43 15@2x"
src="https://github.com/user-attachments/assets/230fbfb7-272d-4a2a-93e7-7268962a9814"
/>

### with Japanese wiki dump

<img width="2008" height="518" alt="CleanShot 2025-11-26 at 08 43 49@2x"
src="https://github.com/user-attachments/assets/edb408c8-a604-4a8f-bd5b-80f19e3d65ee"
/>

### with Arabic wiki dump

<img width="2010" height="512" alt="CleanShot 2025-11-26 at 08 44 25@2x"
src="https://github.com/user-attachments/assets/81a29ac8-0586-4e82-8276-d7fa90c31c90"
/>


TODO:

* [x] Take a closer look at the assembly and understand why this PR (8
KB vs 1 KB table) is faster on my machine.
* [x] _(**edit**: checking this off because it seems unnecessary)_ If
this turns out to actually be unacceptably slower, one possibility is to
switch to `uucode`'s `precomputedGraphemeBreak` which uses a 1445 byte
table since it uses a dense table (indexed using multiplication instead
of bitCast, though, which did show up in the initial benchmarks from
https://github.com/ghostty-org/ghostty/pull/8757 a small amount.)

AI was used in some of the uucode changes in
https://github.com/ghostty-org/ghostty/pull/9678 (Amp--primarily for
tests), but everything was carefully vetted and much of it done by hand.
This PR was made without AI with the exception of consulting AI about
whether the "Prepend + ASCII" scenario is common (hopefully it's right
about that being uncommon).
2026-01-20 09:44:15 -08:00
Mitchell Hashimoto
965ffb1750 pkg/dcimgui: add freetype 2025-12-31 13:20:27 -08:00
Mitchell Hashimoto
f1ba5297b8 build: fix imgui on GTK 2025-12-31 13:20:03 -08:00
Mitchell Hashimoto
978400b0b0 replace cimgui with dcimgui 2025-12-31 10:42:10 -08:00
David Matos
35779be65d i18n: Localize Nautilus .py script 2025-12-19 10:31:39 -05:00
IceCodeNew
ccc2d32aa5 Fix macOS log command for Ghostty
Corrected the command for viewing Ghostty logs on macOS.
2025-12-17 05:16:27 +08:00
Jeffrey C. Ollie
f8c03bb6f6 logging: document GHOSTTY_LOG and make it more flexible 2025-12-15 11:54:36 -08:00
kadekillary
a0a915a06f refactor(build): simplify dependency detection logic
- Removes unnecessary marker constant from build.zig that existed
  solely to signal build root status
- Uses filesystem check (@src().file access) instead of compile-time
  declaration lookup to detect when ghostty is a dependency
- Same behavior with less indirection: file resolves from build root
  only when ghostty is the main project
2025-12-15 06:31:54 -06:00
Mitchell Hashimoto
7642b8bec4 build: highway system integration should default to false 2025-12-10 13:13:38 -08:00
Mitchell Hashimoto
143748a8d3 Add system integration for highway (#9642) 2025-12-10 13:00:46 -08:00
Tim Culverhouse
05c704b247 build: skip git version detection when used as dependency
Detect if ghostty is being built as a dependency by comparing the build
root with ghostty's source directory. When used as a dependency, skip
git detection entirely and use the version from build.zig.zon.

This fixes build failures when downstream projects have git tags that
don't match ghostty's version format. Previously, ghostty would read
the downstream project's git tags and panic at Config.zig:246 with
"tagged releases must be in vX.Y.Z format matching build.zig".
2025-12-10 12:43:14 -08:00
Jacob Sandlund
8d470816cf Merge branch 'grapheme-break' into grapheme-width-changes 2025-12-09 08:45:54 -05:00
Jacob Sandlund
7bddbfed1e Merge branch 'main' into grapheme-break 2025-12-09 08:45:42 -05:00
Tim Culverhouse
7fe3f5cd3f build: fix path access to work with relative build roots
Replace std.fs.accessAbsolute(b.pathFromRoot(...)) with
b.build_root.handle.access(...) since pathFromRoot can return
relative paths, but accessAbsolute asserts the path is absolute.
2025-12-01 18:29:54 -06:00
Jacob Sandlund
8020a88205 Merge branch 'grapheme-break' into grapheme-width-changes 2025-11-30 08:57:53 -05:00
Jacob Sandlund
c49d50eb80 Merge remote-tracking branch 'upstream/main' into grapheme-break 2025-11-30 08:57:08 -05:00
Mitchell Hashimoto
dbfc3eb679 Remove unused imports 2025-11-27 13:37:53 -08:00
Jacob Sandlund
d240a194e1 Merge branch 'grapheme-break' into grapheme-width-changes 2025-11-24 11:51:08 -05:00
Jacob Sandlund
e52f0d233f Merge remote-tracking branch 'upstream/main' into grapheme-break 2025-11-24 11:44:47 -05:00
Jacob Sandlund
a67cfb4232 Merge branch 'grapheme-break' into grapheme-width-changes 2025-11-24 09:15:25 -05:00
Jacob Sandlund
eb9f384f87 Merge branch 'uucode-update' into grapheme-break 2025-11-24 09:15:13 -05:00
Jacob Sandlund
b58656be8a Merge branch 'uucode-update' into vs-correctness 2025-11-24 09:14:32 -05:00
Jacob Sandlund
61c7381452 Update comment. PR for wcwidth_standalone might be a bit 2025-11-24 09:14:03 -05:00
Jacob Sandlund
6afdf3400e unicode: change cell to wide when grapheme width changes 2025-11-24 04:47:23 -05:00
Jacob Sandlund
c3d8951bdb Merge branch 'uucode-update' into grapheme-break 2025-11-23 22:56:25 -05:00
Jacob Sandlund
55c1cb3aad Merge branch 'uucode-update' into vs-correctness 2025-11-23 22:56:15 -05:00
Jacob Sandlund
62ec34072f fix typo 2025-11-23 22:56:00 -05:00
Jacob Sandlund
36c3295806 unicode: don't narrow invalid text presentation (VS15) sequences 2025-11-23 22:39:21 -05:00
Jacob Sandlund
97aff0743e unicode: switch to uucode grapheme break to match unicode 16 spec 2025-11-23 22:33:01 -05:00