diff --git a/src/selection.cc b/src/selection.cc index ee849bc4..81d2c051 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -594,6 +594,9 @@ Selection selection_from_string(StringView desc) SelectionList selection_list_from_string(Buffer& buffer, StringView desc) { + if (desc.empty()) + throw runtime_error{"empty selection description"}; + Vector sels; for (auto sel_desc : desc | split(':')) sels.push_back(selection_from_string(sel_desc));