Add statusline errors when nothing is selected with `s`, `K`, `A-K` (#11370)

pull/9932/merge
André Carneiro 4 months ago committed by GitHub
parent cfe80acb6f
commit 0a4432b104
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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");
}
},
);
@ -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");
}
},
)

Loading…
Cancel
Save