diff --git a/src/selection.hh b/src/selection.hh index edf8e601..fa0da47a 100644 --- a/src/selection.hh +++ b/src/selection.hh @@ -101,7 +101,8 @@ struct SelectionList SelectionList& operator=(Vector list) { - set(std::move(list), list.size()-1); + const size_t main_index = list.size()-1; + set(std::move(list), main_index); return *this; }