Merge pull request #1387 from mattrobenolt/cmd-click

Open links with Super+click
This commit is contained in:
Mitchell Hashimoto
2024-01-27 21:04:51 -08:00
committed by GitHub
7 changed files with 118 additions and 12 deletions

View File

@@ -5,6 +5,7 @@
const Link = @This();
const oni = @import("oniguruma");
const Mods = @import("key.zig").Mods;
/// The regular expression that will be used to match the link. Ownership
/// of this memory is up to the caller. The link will never free this memory.
@@ -30,6 +31,13 @@ pub const Highlight = union(enum) {
/// Only highlight the link when the mouse is hovering over it.
hover: void,
/// Highlight anytime the given mods are pressed, either when
/// hovering or always. For always, all links will be highlighted
/// when the mods are pressed regardless of if the mouse is hovering
/// over them.
always_mods: Mods,
hover_mods: Mods,
};
/// Returns a new oni.Regex that can be used to match the link.