mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-26 17:23:56 +00:00
add end_search binding
This commit is contained in:
@@ -333,7 +333,11 @@ pub const Action = union(enum) {
|
||||
set_font_size: f32,
|
||||
|
||||
/// Start a search for the given text. If the text is empty, then
|
||||
/// the search is canceled. If a previous search is active, it is replaced.
|
||||
/// the search is canceled. A canceled search will not disable any GUI
|
||||
/// elements showing search. For that, the explicit end_search binding
|
||||
/// should be used.
|
||||
///
|
||||
/// If a previous search is active, it is replaced.
|
||||
search: []const u8,
|
||||
|
||||
/// Navigate the search results. If there is no active search, this
|
||||
@@ -344,6 +348,9 @@ pub const Action = union(enum) {
|
||||
/// search terms, but opens the UI for searching.
|
||||
start_search,
|
||||
|
||||
/// End the current search if any and hide any GUI elements.
|
||||
end_search,
|
||||
|
||||
/// Clear the screen and all scrollback.
|
||||
clear_screen,
|
||||
|
||||
@@ -1172,6 +1179,7 @@ pub const Action = union(enum) {
|
||||
.search,
|
||||
.navigate_search,
|
||||
.start_search,
|
||||
.end_search,
|
||||
.reset,
|
||||
.copy_to_clipboard,
|
||||
.copy_url_to_clipboard,
|
||||
|
||||
@@ -169,6 +169,12 @@ fn actionCommands(action: Action.Key) []const Command {
|
||||
.description = "Start a search if one isn't already active.",
|
||||
}},
|
||||
|
||||
.end_search => comptime &.{.{
|
||||
.action = .end_search,
|
||||
.title = "End Search",
|
||||
.description = "End the current search if any and hide any GUI elements.",
|
||||
}},
|
||||
|
||||
.navigate_search => comptime &.{ .{
|
||||
.action = .{ .navigate_search = .next },
|
||||
.title = "Next Search Result",
|
||||
|
||||
Reference in New Issue
Block a user