7238 Commits

Author SHA1 Message Date
Leah Amelia Chen
f0db0c850b renderer(metal): fix tests 2024-09-09 17:13:33 +02:00
Leah Amelia Chen
83bcf939fd config: make blink interval configurable 2024-09-09 17:13:33 +02:00
Leah Amelia Chen
789cec1b8b config: add text-blink option to opt out of text blinking 2024-09-09 17:13:33 +02:00
Leah Amelia Chen
7d150b050c renderer: make blinking more robust
As it turns out you can just set an "always visible" flag for the cursor
when a user starts typing, and unset it when the next blink occurs.

Note to self: maybe consider spending less time coding at 1am.
2024-09-09 17:13:33 +02:00
Leah Amelia Chen
7f22f15e5b renderer: decouple text blink from cursor blink
Coupling the text blink to the cursor blink leads to interesting
problems, such as the text blink stopping when the user is typing,
as the cursor is coded to stop blinking during typing. We now make the
text blink on a separate timer that drives the cursor blink, so that
text input events can easily cancel the cursor blink, waiting for it to
be re-synchronized to the text blink.
2024-09-09 17:13:33 +02:00
Leah Amelia Chen
4834c706db renderer(metal): set defaults for cell mode enum
To reduce code duplication and bring it more in line with the OpenGL
equivalent.
2024-09-09 17:13:33 +02:00
Matt Robenolt
99742879c2 metal: fix compilation errors with blinking 2024-09-09 17:13:33 +02:00
Leah Amelia Chen
b68f420376 renderer(metal): fix shader 2024-09-09 17:13:33 +02:00
Leah Amelia Chen
49415ef1d2 renderer(metal): implement blinking (untested!)
See a9561a46 (this commit's OpenGL equivalent) for more information.
Untested for now since I don't have a macOS setup.
2024-09-09 17:13:33 +02:00
Leah Amelia Chen
1d04c52bb2 renderer(opengl): implement blinking cells, make render modes a bitfield
The render modes in the vertex shader has always been... strange. It
kind of functioned like an enum and a bitfield at the same time. To
comfortably accommodate adding blink information on cells, I've
refactored it to make it into a true bitfield -- this made the logic
on the Zig side much simpler, with the tradeoff being that logic is
slightly harder to read in the shader code as GLSL does not support
implicitly casting integers after bitmasking to booleans.

The blink is currently synchronized to the cursor blinking (which is
what most other terminal emulators do), though we should be able to
have a separate cell blink timer in the future should the need appear.
2024-09-09 17:13:33 +02:00
Mitchell Hashimoto
12bf107bcb update README 2024-09-08 21:30:07 -07:00
Mitchell Hashimoto
d4feae67c8 Merge pull request #2207 from mohshami/fedora_install_doc
Add package names for Fedora variants
2024-09-08 09:40:11 -07:00
Mohammad H. AlShami
20fdd6ee9f Fix copied mistake 2024-09-07 13:10:59 -05:00
Mohammad H. AlShami
4ee615294b Add package names for Fedora variants 2024-09-07 13:06:36 -05:00
Mitchell Hashimoto
4501991325 Merge pull request #2201 from qwerasd205/wide-boundary-conds
Wide cell boundary conditions in ECH & DCH + soft-wrap reset correctness
2024-09-06 19:00:15 -07:00
Qwerasd
5138801b7b comment 2024-09-06 18:03:56 -04:00
Qwerasd
9669332134 terminal: cursorResetWrap should not reset wrap_continuation 2024-09-06 17:57:14 -04:00
Mitchell Hashimoto
8f47581e22 terminal: add test for wide character on right margin boundary 2024-09-06 14:28:04 -07:00
Mitchell Hashimoto
f4052fd824 terminal: fix uninitialized memory access when kitty color protocol 2024-09-06 14:08:33 -07:00
Qwerasd
057f218c9e perf(terminal): specialize splitCellBoundary to cursor row
+ do some abstraction leakage in `cursorResetWrap`, since they're both
used in hot functions for TUI stuff so performance is important.
2024-09-06 13:26:57 -04:00
Mitchell Hashimoto
c16a4fd95e Merge pull request #2203 from ghostty-org/crash-envelope
Crash envelope rich decoding, fix parsing multiple items, serialization
2024-09-06 09:53:37 -07:00
Mitchell Hashimoto
b2696ee6fa crash: envelope parsing handles multiple payloads with length properly 2024-09-06 09:48:21 -07:00
Qwerasd
8d12044f1d Terminal: fix ECH & DCH wide char boundary cond. behavior 2024-09-06 12:35:11 -04:00
Qwerasd
04271c6a07 test(Terminal): test ECH wide char boundary conditions 2024-09-06 12:35:11 -04:00
Qwerasd
1692a82b33 test(Terminal): test DCH wide char boundary conditions 2024-09-06 12:35:11 -04:00
Mitchell Hashimoto
4acbdbc038 typos 2024-09-06 09:23:33 -07:00
Mitchell Hashimoto
646b8a4cdd crash: parse attachments from sentry envelope 2024-09-06 09:21:36 -07:00
Mitchell Hashimoto
6788aefe95 crash: data model for encoded vs decoded items 2024-09-06 08:50:18 -07:00
Mitchell Hashimoto
ee6fd80746 crash: envelope encoder 2024-09-05 21:24:14 -07:00
Mitchell Hashimoto
cc59c5d5d9 Merge pull request #2202 from ghostty-org/push-xqxploovxolw
font/sprite: avoid invalid glyph if unsupported codepoint is attempted
2024-09-05 20:26:41 -07:00
Mitchell Hashimoto
c9523a6ee0 font/sprite: avoid invalid glyph if unsupported codepoint is attempted 2024-09-05 20:22:51 -07:00
Mitchell Hashimoto
eec2b1e3e8 Merge pull request #2200 from tristan957/gtk-accel-warning
gtk: silence bad accelerator warnings
2024-09-05 18:20:53 -07:00
Tristan Partin
a0bc6ae966 gtk: silence bad accelerator warnings
Before this a commit a keybind of CTRL + \ would create a GTK
accelerator of <Ctrl>\, which is incorrect. It needs to be
<Ctrl>backslash, which can be retrieved with gdk_keyval_name().

Signed-off-by: Tristan Partin <tristan@partin.io>
2024-09-05 19:08:29 -05:00
Mitchell Hashimoto
0f4d07e68c Merge pull request #2199 from ghostty-org/osc
terminal: do not reset OSC parser if its already empty
2024-09-05 16:58:25 -07:00
Mitchell Hashimoto
738a4c568a terminal: do not reset OSC parser if its already empty
This is not a safe operation since the OSC parser has undefined memory
when it is in the empty state. This is on purpose for performance
reasons.
2024-09-05 16:53:34 -07:00
Mitchell Hashimoto
b283307dd6 update vouch instructions 2024-09-05 15:17:00 -07:00
Mitchell Hashimoto
ce85eb1d91 readme: update vouch help 2024-09-05 15:13:13 -07:00
Mitchell Hashimoto
e5bc7d5772 Merge pull request #2198 from ghostty-org/decaln
DECALN must clear protected cells (fixes managed memory leak in page)
2024-09-05 14:43:32 -07:00
Mitchell Hashimoto
693755693a terminal: can't assert page integrity on screen 2024-09-05 14:41:02 -07:00
Mitchell Hashimoto
a6031efa04 terminal: DECALN must use clearRows to clear protected memory 2024-09-05 14:35:12 -07:00
Mitchell Hashimoto
f0149722e6 terminal: add integrity check for unmarked grapheme cell 2024-09-05 14:17:11 -07:00
Mitchell Hashimoto
a3aa5463a1 Revert "Merge pull request #2060 from jcollie/gtk-compatibility"
This reverts commit 9ce789cc85d411c59eff2a01c7fe18ce14ccd2b8, reversing
changes made to f1aea10a84176ff4338f7d2f0bf1b9c700b41baa.
2024-09-05 08:45:37 -07:00
Mitchell Hashimoto
2c48e86a86 Merge pull request #2196 from gpanders/push-oxsosnpoxtwz
termio: send initial focus reports
2024-09-04 20:56:59 -07:00
Gregory Anders
df06697899 termio: send initial focus reports
When the focus reporting mode (1004) is enabled, send the current focus
state. This allows applications to track their own focus state without
first having to wait for a focus event (or query
it by sending a DECSET followed by a DECRST).

Ghostty's focus state is stored only in the renderer, where the termio
thread cannot access it. We duplicate the focus state tracking in the
Terminal struct with the addition of a new (1-bit) flag. We duplicate
the state because the renderer uses the focus state for its own purposes
(in particular, the Metal renderer uses the focus state to manage
its DisplayLink), and synchronizing access to the shared terminal state
is more cumbersome than simply tracking the focus state in the renderer
in addition to the terminal.
2024-09-04 22:13:52 -05:00
Mitchell Hashimoto
42b799e9a0 Merge pull request #2194 from jcollie/wuffs-blend-mode
wuffs: fix blend mode
2024-09-04 16:58:35 -07:00
Jeffrey C. Ollie
f2d53b451b wuffs: fix blend mode 2024-09-04 18:23:54 -05:00
Mitchell Hashimoto
2142ba53c4 apprt/gtk: do not remove unfocused widget from overlay
See comment
2024-09-04 14:17:51 -07:00
Mitchell Hashimoto
125982a5e2 Merge pull request #2191 from ghostty-org/push-uupwrypuzvsp
kitty gfx: handle `q` with chunked transmissions properly
2024-09-04 10:28:33 -07:00
Mitchell Hashimoto
761bcfad50 kitty gfx: handle q with chunked transmissions properly
Fixes #2190

The `q` value with chunk transmissions is a bit complicated. The initial
transmission ("start" command) `q` value is used for all subsequent
chunks UNLESS a subsequent chunk specifies a `q >= 1`. If a chunk
specifies `q >= 1`, then that `q` value is subsequently used for all
future chunks unless another chunk specifies `q >= 1`. And so on.

This commit importantly also introduces the ability to test a full Kitty
command from string request to structured response. This will let us
prevent regressions in the future and ensure that we are correctly
handling the complex underspecified behavior of Kitty Graphics.
2024-09-04 10:24:25 -07:00
Mitchell Hashimoto
3e9163e4c6 Merge pull request #2189 from ghostty-org/dependabot/github_actions/namespacelabs/nscloud-cache-action-1.1.7
build(deps): bump namespacelabs/nscloud-cache-action from 1.1.6 to 1.1.7
2024-09-03 18:18:01 -07:00