Commit Graph

14 Commits (5ac8e6569a8d1d73f1bff9b4fc82ea703b9ca97e)

Author SHA1 Message Date
Mitchell Hashimoto 5ac8e6569a
libghostty: add ghostty_selection_gesture_event 2026-05-27 10:47:26 -07:00
Mitchell Hashimoto bbfa984aec
libghostty: GhosttySelectionGestureEvent 2026-05-27 10:42:29 -07:00
Mitchell Hashimoto 2f61ba036e
libghostty: starting the SelectionGesture API, just init/get 2026-05-27 09:02:25 -07:00
Mitchell Hashimoto 2ce5db29ca
libghostty: selection formatting 2026-05-24 14:01:35 -07:00
Mitchell Hashimoto eb777b8036
libghostty: selectWordBetween in C 2026-05-24 13:53:31 -07:00
Mitchell Hashimoto e8f5353912
example/c-vt-selection 2026-05-24 13:48:10 -07:00
Mitchell Hashimoto cc48312c08
libghostty: selection word/line/output/all helpers 2026-05-24 13:42:20 -07:00
Mitchell Hashimoto 847b8afc87
libghostty: remove selection validation, way too expensive 2026-05-23 18:31:20 -07:00
Mitchell Hashimoto ae839393d9
libghostty: add Selection equal and validate 2026-05-23 15:23:39 -07:00
Mitchell Hashimoto 2512fad940
libghostty: move selection functions to selection doxygen group 2026-05-23 15:20:45 -07:00
Mitchell Hashimoto 4a77e81967
libghostty: add selection ordering APIs
Expose selection endpoint ordering through the libghostty-vt C API so
embedders can safely normalize selections whose start and end refs may be
reversed. The new APIs report the current order and return a fresh
untracked selection with forward or reverse bounds.

Selection.Order now uses lib.Enum, matching the existing adjustment enum
pattern and keeping the C ABI enum generated from the same Zig source of
truth. The new functions are wired through the C API re-export and lib-vt
export paths, with coverage for mirrored rectangular selection ordering.
2026-05-23 15:16:04 -07:00
Mitchell Hashimoto 15d8963681
libghostty: add selection adjustment api 2026-05-23 15:12:32 -07:00
Mitchell Hashimoto 545a5aef66
libghostty: document selection snapshot lifetime
Clarify that GhosttySelection is a snapshot type whose endpoints are
untracked GhosttyGridRef values. The previous documentation described the
range shape but did not repeat the grid reference lifetime caveat, which
made it easy to keep selections across terminal mutations incorrectly.
2026-05-23 15:05:23 -07:00
Mitchell Hashimoto 757eff5881
libghostty: add GhosttySelection type and selection support to formatter
Add a new GhosttySelection C API type (selection.h / c/selection.zig)
that pairs two GhosttyGridRef endpoints with a rectangle flag. This
maps directly to the internal Selection type using untracked pins.

The formatter terminal options gain an optional selection pointer.
When non-null the formatter restricts output to the specified range
instead of emitting the entire screen. When null the existing
behavior of formatting the full screen is preserved.
2026-04-04 20:38:05 -07:00