- /*
- ** Cycle through the range and select the messages
- ** that exist. If ALLOW_NEW is set, then we also check
- ** if we are selecting an empty slot.
- */
- for (; first <= last; first++) {
- if (does_exist(mp, first) ||
- ((mp->msgflags & ALLOW_NEW) && is_select_empty(mp, first))) {
- if (!is_selected(mp, first)) {
- set_selected(mp, first);
- mp->numsel++;
- if (mp->lowsel == 0 || first < mp->lowsel)
- mp->lowsel = first;
- if (first > mp->hghsel)
- mp->hghsel = first;
- }
+ /* Cycle through the range and select the messages that exist. */
+ for (found=0; first <= last; first++) {
+ if (does_exist(mp, first)) {
+ set_selected(mp, first);