Fix index_selection() not updating empty selections
Newly created selections are empty but must still be indexed. Fixes #3431
This commit is contained in:
parent
b5ac06e652
commit
a13f815591
@ -222,7 +222,6 @@ static inline void
|
|||||||
index_selection(const Screen *self, Selections *selections, bool up) {
|
index_selection(const Screen *self, Selections *selections, bool up) {
|
||||||
for (size_t i = 0; i < selections->count; i++) {
|
for (size_t i = 0; i < selections->count; i++) {
|
||||||
Selection *s = selections->items + i;
|
Selection *s = selections->items + i;
|
||||||
if (!is_selection_empty(s)) {
|
|
||||||
if (up) {
|
if (up) {
|
||||||
if (s->start.y == 0) s->start_scrolled_by += 1;
|
if (s->start.y == 0) s->start_scrolled_by += 1;
|
||||||
else {
|
else {
|
||||||
@ -243,7 +242,6 @@ index_selection(const Screen *self, Selections *selections, bool up) {
|
|||||||
else s->end.y++;
|
else s->end.y++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user