summaryrefslogtreecommitdiff
path: root/src/terminal
AgeCommit message (Collapse)Author
2025-10-10osc: do inplace decoding of cmdline passed in OSC 133;C (#9127)Jeffrey C. Ollie
2025-10-07terminal: add semi-colon character to word boundary listRavi Chandra
2025-10-06lib-vt: begin paste utilities exports starting with safe pasteMitchell Hashimoto
2025-10-06osc: parse additional OSC 133 optionsJeffrey C. Ollie
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-05osc: reorder osc tests and name them consistentlyJeffrey C. Ollie
2025-10-05lib-vt: expose key encoding as a C APIMitchell Hashimoto
2025-10-04input: use std.Io.Writer for key encoder, new API, expose via libghosttyMitchell Hashimoto
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-04Move paste encoding to the input package, test, optimize away one allocMitchell Hashimoto
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-03ci: cleanupMitchell Hashimoto
2025-10-03Zig 0.15: zig build GTK exeMitchell Hashimoto
2025-10-03Zig 0.15: zig build test Mitchell Hashimoto
2025-10-03terminal: Zig 0.15, lib-vt and test-lib-vt workMitchell Hashimoto
2025-10-03Zig 0.15: zig fmtMitchell Hashimoto
2025-09-30fix test failuresQwerasd
Very weird failures, not 100% sure of the cause; regardless, this fixes them.
2025-09-30terminal: inline all the thingsQwerasd
A whole bunch of inline annotations, some of these were tracked down with Instruments.app, others are guesses / just seemed right because they were trivial wrapper functions. Regardless, these changes are ultimately supported by improved vtebench results on my machine (Apple M3 Max).
2025-09-30Merge branch 'main' into jacob/uucodeMitchell Hashimoto
2025-09-29move test out of terminal to avoid lib-vt catchMitchell Hashimoto
2025-09-29fix(font): Treat Powerline glyphs as normal characters for constraint width ↵Mitchell Hashimoto
purposes (#8829) Powerline glyphs were treated as whitespace, giving the preceding cell a constraint width of 2 and cutting off icons in people's prompts and statuslines. It is however correct to not treat Powerline glyphs like other Nerd Font symbols; they should simply be treated as normal characters, just like their relatives in the block elements unicode block. This resolves https://discord.com/channels/1005603569187160125/1417236683266592798 (never promoted to an issue, but real and easy to reproduce). **Tip** <img width="215" height="63" alt="Screenshot 2025-09-21 at 16 57 58" src="https://github.com/user-attachments/assets/81e770c5-d688-4d8e-839c-1f4288703c06" /> **This PR** <img width="215" height="63" alt="Screenshot 2025-09-21 at 16 58 42" src="https://github.com/user-attachments/assets/5d2dd770-0314-46f6-99b5-237a0933998e" /> The constraint width logic was untested but contains some quite subtle interactions, so I wrote a suite of tests covering the cases I'm aware of. While working on this code I also resolved a TODO comment to add all the box drawing/block element type characters to the set of codepoints excluded from the minimum contrast settings.
2025-09-29lib-vt: OSC data extraction boilerplateMitchell Hashimoto
This also changes OSC strings to be null-terminated to ease lib-vt integration. This shouldn't have any practical effect on terminal performance, but it does lower the maximum length of OSC strings by 1 since we always reserve space for the null terminator.
2025-09-28build: use build options to configure terminal C ABI modeMitchell Hashimoto
Fixes various issues: - C ABI detection was faulty, which caused some Zig programs to use the C ABI mode and some C programs not to. Let's be explicit. - Unit tests now tests C ABI mode. - Build binary no longer rebuilds on any terminal change (a regression). - Zig programs can choose to depend on the C ABI version of the terminal lib by using the `ghostty-vt-c` module.
2025-09-28lib-vt: expose command type enumMitchell Hashimoto
2025-09-27lib-vt: expose ghostty_osc_endMitchell Hashimoto
2025-09-27terminal: osc parser end returns a pointerMitchell Hashimoto
2025-09-27terminal: use LibEnum for the command keysMitchell Hashimoto
2025-09-27lib_vt: osc_next/resetMitchell Hashimoto
2025-09-27terminal: shuffle some C APIs to make it more long term maintainableMitchell Hashimoto
2025-09-25Merge remote-tracking branch 'upstream/main' into jacob/uucodeJacob Sandlund
2025-09-24lib-vt: update header commentsMitchell Hashimoto
2025-09-24remove vt prefixesMitchell Hashimoto
2025-09-24terminal: simplify opaque typeMitchell Hashimoto
2025-09-24remove unused itemsMitchell Hashimoto
2025-09-24lib-vt: setup a default allocator if nullMitchell Hashimoto
2025-09-24lib: allocator interface based on Zig allocatorsMitchell Hashimoto
2025-09-23lib-vt: boilerplate to build a shared objectMitchell Hashimoto
2025-09-23Merge remote-tracking branch 'upstream/main' into jacob/uucodeJacob Sandlund
2025-09-22build: make build_options generally availableMitchell Hashimoto
2025-09-21terminal: fix mistaken gtk logicMitchell Hashimoto
2025-09-21Add simd flag for disabling SIMD functionalityMitchell Hashimoto
2025-09-21terminal: don't build StringMap.searchIterator without regex supportMitchell Hashimoto
2025-09-21terminal: support disabling kitty graphics protocolMitchell Hashimoto
2025-09-21terminal: add build option for oniguruma, which controls tmux cc modeMitchell Hashimoto
2025-09-21start extracting core terminal zig moduleMitchell Hashimoto
2025-09-21Add constraint width testsDaniel Wennberg
2025-09-20unicode: isolate properties, tables, and ziglyph into separate filesMitchell Hashimoto
This makes it cleaner to add new sources of table generation and also avoids inadvertently depending on different modules (despite Zig's lazy analysis). This also fixes up terminal to only use our look up tables which avoids bringing ziglyph in for the terminal module.
2025-09-18fix up diff from benchmarks, and add tests against ziglyphJacob Sandlund
2025-09-17Merge remote-tracking branch 'upstream/main' into jacob/uucodeJacob Sandlund
2025-09-12terminal: OSC 104 with no semicolon should parse as reset paletteMitchell Hashimoto
https://github.com/ghostty-org/ghostty/pull/8590#issuecomment-3287418867
2025-09-11terminal: update parser to use new color parser and stream handlerMitchell Hashimoto
2025-09-11terminal: osc 104/105 are more flexible on invalid indexMitchell Hashimoto
2025-09-11terminal: remove old color testsMitchell Hashimoto