aboutsummaryrefslogtreecommitdiff
path: root/foot-server@.socket
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-04-23 10:25:21 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-04-24 18:17:37 +0000
commitd068e821d60dc9d9ae606969010b087040b98b59 (patch)
treeee40d784e0b1ffe46b880bceabf9d023ca0c7f2f /foot-server@.socket
parentsearch: maches_next: assert match coordinates are valid (diff)
search: matches_next: don’t wrap around grid->num_rows
When bumping the iter’s start.row, we’re working with view-local coordinates. That is, 0 >= row < term->rows. This means it is wrong to and with grid->num_rows - 1, because a), ‘row’ should **never** be that big. And b), if we do, we’ll just end up in an infinite loop, where the next call to matches_next() just starts over from the beginning again (and eventually hitting the exact same place that got us started).
Diffstat (limited to 'foot-server@.socket')
0 files changed, 0 insertions, 0 deletions