hackily handle overly large posts
We don't have pagination within a single post yet.
This commit is contained in:
parent
91ae7ff9ba
commit
9c25023a20
|
@ -214,6 +214,18 @@ fn page-down _env: (addr environment), _items: (addr item-list) {
|
||||||
}
|
}
|
||||||
new-item-index <- increment
|
new-item-index <- increment
|
||||||
var dest/eax: (addr int) <- get env, item-index
|
var dest/eax: (addr int) <- get env, item-index
|
||||||
|
{
|
||||||
|
# HACK: make sure we make forward progress even if a single post takes up
|
||||||
|
# the whole screen.
|
||||||
|
# We can't see the rest of that single post at the moment. But at least we
|
||||||
|
# can go past it.
|
||||||
|
compare new-item-index, *dest
|
||||||
|
break-if-!=
|
||||||
|
# Don't make "forward progress" past post 0.
|
||||||
|
compare new-item-index, 0
|
||||||
|
break-if-=
|
||||||
|
new-item-index <- decrement
|
||||||
|
}
|
||||||
copy-to *dest, new-item-index
|
copy-to *dest, new-item-index
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue