aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/config/Config.zig
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-07 18:29:21 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-07 18:29:21 +0300
commitdcfe11a7588fcd42471159453810abc9b7720a57 (patch)
treec32a77266028e73ca2382b96c96f8438a5fcd621 /vendor/libghostty-vt/src/config/Config.zig
parent2dfed860103c4e4505ac7f25def9fe37da1e1e6a (diff)
build: update libghostty-vt vendor
vendor ghostty 063ac3e and remove the musl libc++ link workaround. expose the new selection formatter and hyperlink uri apis for follow-up rendering work. add manual artifact validation for static linux builds.
Diffstat (limited to 'vendor/libghostty-vt/src/config/Config.zig')
-rw-r--r--vendor/libghostty-vt/src/config/Config.zig61
1 files changed, 57 insertions, 4 deletions
diff --git a/vendor/libghostty-vt/src/config/Config.zig b/vendor/libghostty-vt/src/config/Config.zig
index 13f78eea..5b1d73de 100644
--- a/vendor/libghostty-vt/src/config/Config.zig
+++ b/vendor/libghostty-vt/src/config/Config.zig
@@ -2404,8 +2404,12 @@ keybind: Keybinds = .{},
/// The value `clipboard` will always copy text to the selection clipboard
/// as well as the system clipboard.
///
-/// Middle-click paste will always use the selection clipboard. Middle-click
-/// paste is always enabled even if this is `false`.
+/// Middle-click primary paste (see `middle-click-action`) is enabled by
+/// default even if this is `false`. The clipboard it pastes from follows
+/// this setting: with `true` (or `false`) it reads from the selection
+/// clipboard (falling back to the system clipboard on platforms without a
+/// selection clipboard); with `clipboard` it reads from the system
+/// clipboard.
///
/// The default value is true on Linux and macOS.
@"copy-on-select": CopyOnSelect = switch (builtin.os.tag) {
@@ -2427,6 +2431,16 @@ keybind: Keybinds = .{},
/// The default value is `context-menu`.
@"right-click-action": RightClickAction = .@"context-menu",
+/// The action to take when the user middle-clicks on the terminal surface.
+///
+/// Valid values:
+/// * `primary-paste` - Paste from the selection (or system) clipboard per
+/// `copy-on-select`.
+/// * `ignore` - Do nothing, ignore the middle click.
+///
+/// The default value is `primary-paste`.
+@"middle-click-action": MiddleClickAction = .@"primary-paste",
+
/// The time in milliseconds between clicks to consider a click a repeat
/// (double, triple, etc.) or an entirely new single click. A value of zero will
/// use a platform-specific default. The default on macOS is determined by the
@@ -6397,6 +6411,22 @@ pub const RepeatableFontVariation = struct {
}
};
+/// Returns true if the given key event would trigger a keybinding
+/// if it were to be processed. This is useful for determining if
+/// a key event should be sent to the terminal or not.
+pub fn keyEventIsBinding(
+ self: *Config,
+ event: inputpkg.KeyEvent,
+) bool {
+ switch (event.action) {
+ .release => return false,
+ .press, .repeat => {},
+ }
+
+ // If we have a keybinding for this event then we return true.
+ return self.keybind.set.getEvent(event) != null;
+}
+
/// Stores a set of keybinds.
pub const Keybinds = struct {
set: inputpkg.Binding.Set = .{},
@@ -6747,15 +6777,29 @@ pub const Keybinds = struct {
// Semantic prompts
try self.set.put(
alloc,
- .{ .key = .{ .physical = .page_up }, .mods = .{ .shift = true, .ctrl = true } },
+ .{ .key = .{ .physical = .arrow_up }, .mods = .{ .shift = true, .ctrl = true } },
.{ .jump_to_prompt = -1 },
);
try self.set.put(
alloc,
- .{ .key = .{ .physical = .page_down }, .mods = .{ .shift = true, .ctrl = true } },
+ .{ .key = .{ .physical = .arrow_down }, .mods = .{ .shift = true, .ctrl = true } },
.{ .jump_to_prompt = 1 },
);
+ // Move tab
+ try self.set.putFlags(
+ alloc,
+ .{ .key = .{ .physical = .page_up }, .mods = .{ .shift = true, .ctrl = true } },
+ .{ .move_tab = -1 },
+ .{ .performable = true },
+ );
+ try self.set.putFlags(
+ alloc,
+ .{ .key = .{ .physical = .page_down }, .mods = .{ .shift = true, .ctrl = true } },
+ .{ .move_tab = 1 },
+ .{ .performable = true },
+ );
+
// Search
try self.set.putFlags(
alloc,
@@ -8620,6 +8664,15 @@ pub const RightClickAction = enum {
@"context-menu",
};
+/// Options for middle-click actions.
+pub const MiddleClickAction = enum {
+ /// Paste from the selection/standard clipboard per `copy-on-select`.
+ @"primary-paste",
+
+ /// No action is taken on middle click.
+ ignore,
+};
+
/// Shell integration values
pub const ShellIntegration = enum {
none,