B:BD[
7.107237] → [
8.3527:3527]
BD:BD[
7.107237] → [
8.3527:3527]
∅:D[
8.3527] → [
10.3599:3762]
B:BD[
9.108453] → [
10.3599:3762]
BD:BD[
9.108453] → [
10.3599:3762]
B:BD[
10.3762] → [
8.3528:3581]
BD:BD[
10.3762] → [
8.3528:3581]
∅:D[
8.3581] → [
10.3763:3856]
B:BD[
9.108506] → [
10.3763:3856]
BD:BD[
9.108506] → [
10.3763:3856]
B:BD[
10.3856] → [
8.3582:3798]
BD:BD[
10.3856] → [
8.3582:3798]
∅:D[
8.3798] → [
7.107420:107426]
B:BD[
11.5439] → [
7.107420:107426]
-- If a line/paragraph gets to a page boundary, I often want to scroll
-- before I get to the bottom.
-- However, only do this if it makes forward progress.
local bot2 = Text.to2(State, State.screen_bottom1)
if bot2.screen_line > 1 then
bot2.screen_line = math.max(bot2.screen_line-10, 1)
end
local new_top1 = Text.to1(State, bot2)
if Text.lt1(State.screen_top1, new_top1) then
State.screen_top1 = new_top1
else
State.screen_top1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}
end
State.screen_top1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}