Devzeth
b224b69054
fix(terminal): increase grapheme_bytes instead of hyperlink_bytes during reflow
...
When reflowing content with many graphemes, the code incorrectly increased hyperlink_bytes capacity
instead of grapheme_bytes, causing GraphemeMapOutOfMemory errors.
2025-12-11 07:03:12 -08:00
Mitchell Hashimoto
86503045e9
fix: prevent integer overflow in hash_map layoutForCapacity ( #9871 )
...
Closes #9862
2025-12-11 06:57:23 -08:00
benodiwal
0d8c193bda
fix(terminal): prevent integer overflow in hash_map layoutForCapacity
...
Co-Authored-By: Sachin <sachinbeniwal0101@gmail.com >
2025-12-11 16:43:16 +05:30
Mitchell Hashimoto
37f467c023
terminal/tmux: docs
2025-12-10 10:37:52 -08:00
Mitchell Hashimoto
b3e7c92263
fmt
2025-12-10 10:34:37 -08:00
Mitchell Hashimoto
29bb18d8cd
terminal/tmux: grab tmux version on startup
2025-12-10 10:34:30 -08:00
Mitchell Hashimoto
58000f5821
terminal/tmux: build up pane states
2025-12-10 10:12:51 -08:00
Mitchell Hashimoto
bf46c4ebe7
terminal/tmux: many more output formats
2025-12-09 21:10:46 -08:00
Mitchell Hashimoto
4c30c5aa76
terminal/tmux: cleanup command queue logic
2025-12-09 20:31:51 -08:00
Mitchell Hashimoto
582ea5d84b
terminal/tmux: window add
2025-12-09 20:07:08 -08:00
Mitchell Hashimoto
1a2b3c165a
terminal/tmux: layoutChanged handling
2025-12-09 17:09:57 -08:00
Mitchell Hashimoto
071070faa3
terminal/tmux: handle session_changed inside command loop
2025-12-09 14:21:07 -08:00
Mitchell Hashimoto
64ef640127
terminal/tmux: exhaustive switch for command
2025-12-09 13:56:16 -08:00
Mitchell Hashimoto
938e419e04
terminal/tmux: handle output events
2025-12-09 13:13:52 -08:00
Mitchell Hashimoto
50ac848672
terminal/tmux: capture both primary/alt screen
2025-12-09 13:00:40 -08:00
Mitchell Hashimoto
a3e01581be
terminal/tmux: history capture clears active area
2025-12-09 11:33:06 -08:00
Mitchell Hashimoto
b7fe9a926d
terminal/tmux: capture visible area after history
2025-12-09 11:22:14 -08:00
Mitchell Hashimoto
41bf541005
terminal/tmux: test helper
2025-12-09 10:53:52 -08:00
Mitchell Hashimoto
e1e2791fb7
terminal/tmux: pane_history replays it into terminal
2025-12-09 10:00:43 -08:00
Mitchell Hashimoto
f02a2d5eed
terminal/tmux: capture pane
2025-12-09 09:25:55 -08:00
Mitchell Hashimoto
766c306e04
terminal/tmux: pane history
2025-12-08 20:15:20 -08:00
Mitchell Hashimoto
ea09d257a1
terminal/tmux: initialize panes
2025-12-08 11:54:48 -08:00
Mitchell Hashimoto
86cd489701
terminal/tmux: introduce command queue for viewer
2025-12-08 09:00:38 -08:00
Mitchell Hashimoto
ec5a60a119
terminal/tmux: make sure we always have space for one action
2025-12-08 07:27:37 -08:00
Mitchell Hashimoto
b26c42f4a6
terminal/tmux: better formatting for notifications and actions
2025-12-08 07:00:44 -08:00
Mitchell Hashimoto
3cbc232e31
terminal/tmux: return allocated list of actions
2025-12-08 07:00:43 -08:00
Mitchell Hashimoto
c1d686534e
terminal/tmux: list windows
2025-12-08 07:00:43 -08:00
Mitchell Hashimoto
4c3ef8fa13
terminal/tmux: viewer list windows state
2025-12-08 07:00:43 -08:00
Mitchell Hashimoto
0d75a78747
terminal/tmux: start viewer state machine
2025-12-08 07:00:43 -08:00
Mitchell Hashimoto
af3a11b546
terminal/tmux: output has format/comptimeFormat
2025-12-08 07:00:43 -08:00
Mitchell Hashimoto
6b21b9147c
terminal/tmux: add output format parsing (minimal)
2025-12-03 20:23:28 -08:00
Mitchell Hashimoto
b95965cb5a
terminal/tmux: add layout-change to control mode parsing
2025-12-03 13:27:37 -08:00
Mitchell Hashimoto
92ea8d0eb5
terminal/tmux: layout checksums
2025-12-03 13:27:37 -08:00
Mitchell Hashimoto
dfa22379b2
terminal/tmux: layout string parser
2025-12-03 13:27:37 -08:00
Mitchell Hashimoto
7a9dc77a94
terminal/tmux: clean up error handling, explicit error sets
2025-12-03 13:27:36 -08:00
Mitchell Hashimoto
6e016ea81e
terminal: move tmux into folder
2025-12-03 13:27:36 -08:00
Mitchell Hashimoto
5bc78d59fb
terminal/tmux: add more control mode parsing keys
2025-12-03 13:27:36 -08:00
Mitchell Hashimoto
4fef41bc83
terminal: renderstate needs to reset highlights on dirty ( #9759 )
...
This fixes memory corruption where future matches on a fully dirty row
would write highlights out of bounds. It was easy to reproduce in debug
by searching for `$` in `ghostty +boo`
2025-11-30 07:22:54 -08:00
Tim Culverhouse
a58e33c06b
PageList: preserve size.cols in adjustCapacity after column shrink
...
When columns shrink during resize-without-reflow, page.size.cols is
updated but page.capacity.cols retains the old larger value. When
adjustCapacity later runs (e.g., to expand style/grapheme storage),
it was creating a new page using page.capacity which has the stale
column count, causing size.cols to revert to the old value.
This caused a crash in render.zig where an assertion checks that
page.size.cols matches PageList.cols.
Fix by explicitly copying page.size.cols to the new page after
creation, matching how size.rows is already handled.
Amp-Thread-ID: https://ampcode.com/threads/T-976bc49a-7bfd-40bd-bbbb-38f66fc925ff
Co-authored-by: Amp <amp@ampcode.com >
2025-11-30 07:20:54 -08:00
Mitchell Hashimoto
d7087627d7
terminal: renderstate needs to reset highlights on dirty
...
This fixes memory corruption where future matches on a fully dirty row
would write highlights out of bounds. It was easy to reproduce in debug
by searching for `$` in `ghostty +boo`
2025-11-30 07:18:42 -08:00
Mitchell Hashimoto
10f19ebdc3
search: handle soft-wrapped lines in sliding window properly
...
Fixes #9752
2025-11-29 07:32:06 -08:00
Mitchell Hashimoto
dbfc3eb679
Remove unused imports
2025-11-27 13:37:53 -08:00
Mitchell Hashimoto
842becbcaf
terminal: PageList search should halt when pin becomes garbage
...
This means that the pin we're using to track our position in the
PageList was part of a node that got reused/recycled at some point. We
can't make any meaningful guarantees about the state of the PageList.
This only happens with scrollback pruning so we can treat it as a
complete search.
2025-11-26 16:36:44 -08:00
Mitchell Hashimoto
b96b55ebde
terminal: RenderState must consider first row in dirty page dirty
2025-11-26 13:20:16 -08:00
Mitchell Hashimoto
d85fc62774
search: reset selected match when the needle changes
2025-11-26 10:04:28 -08:00
Mitchell Hashimoto
f91080a165
terminal: fix single-character search crashes
2025-11-26 08:50:06 -08:00
Mitchell Hashimoto
f252db1f1c
terminal: handle pruning history for when active area removes it
2025-11-26 08:50:06 -08:00
Mitchell Hashimoto
330ce07d48
terminal: fix moving selection on history changing
2025-11-26 08:50:06 -08:00
Mitchell Hashimoto
48acc90983
terminal: search should reload active area if dirty
2025-11-26 08:50:05 -08:00
Mitchell Hashimoto
72708b8253
search: do not restart search if needle doesn't change
2025-11-26 08:50:04 -08:00