diff -r 1bd5534c395d -r 391c2c723029 ui/winui/table.cpp --- a/ui/winui/table.cpp Fri Oct 13 15:20:54 2023 +0200 +++ b/ui/winui/table.cpp Fri Oct 13 19:53:21 2023 +0200 @@ -320,13 +320,18 @@ // select everything between the first selection and the current row std::sort(selection.begin(), selection.end()); int first = selection.front(); + int last = row; + if (first > row) { + last = first; + first = row; + } // clear previous selection change_rows_bg(selection, defaultBrush, defaultBrush); // create new selection std::vector newselection; - for (int s = first; s <= row; s++) { + for (int s = first; s <= last; s++) { newselection.push_back(s); } selection = newselection;