Skip to content

Commit

Permalink
Add statusline errors when nothing is selected with s, K, A-K (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
r4mmer committed Aug 2, 2024
1 parent cfe80ac commit 0a4432b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1939,6 +1939,8 @@ fn select_regex(cx: &mut Context) {
selection::select_on_matches(text, doc.selection(view.id), &regex)
{
doc.set_selection(view.id, selection);
} else {
cx.editor.set_error("nothing selected");
}
},
);
Expand Down Expand Up @@ -4624,6 +4626,8 @@ fn keep_or_remove_selections_impl(cx: &mut Context, remove: bool) {
selection::keep_or_remove_matches(text, doc.selection(view.id), &regex, remove)
{
doc.set_selection(view.id, selection);
} else {
cx.editor.set_error("no selections remaining");
}
},
)
Expand Down

0 comments on commit 0a4432b

Please sign in to comment.