rename the selection search binding, unify into start_search action

This commit is contained in:
Mitchell Hashimoto
2026-01-06 14:08:34 -08:00
parent 9b6a3be993
commit 8e28f58b42
10 changed files with 15 additions and 84 deletions

View File

@@ -368,8 +368,10 @@ pub const Action = union(enum) {
/// If a previous search is active, it is replaced.
search: []const u8,
/// Input the selected text into the search field.
selection_for_search,
/// Start a search for the current text selection. If there is no
/// selection, this does nothing. If a search is already active, this
/// changes the search terms.
search_selection,
/// Navigate the search results. If there is no active search, this
/// is not performed.
@@ -1287,7 +1289,7 @@ pub const Action = union(enum) {
.cursor_key,
.search,
.navigate_search,
.selection_for_search,
.search_selection,
.start_search,
.end_search,
.reset,

View File

@@ -189,10 +189,10 @@ fn actionCommands(action: Action.Key) []const Command {
.description = "Start a search if one isn't already active.",
}},
.selection_for_search => comptime &.{.{
.action = .selection_for_search,
.title = "Selection for Search",
.description = "Input the selected text into the search field.",
.search_selection => comptime &.{.{
.action = .search_selection,
.title = "Search Selection",
.description = "Start a search for the current text selection.",
}},
.end_search => comptime &.{.{