about summary refs log tree commit diff stats
path: root/icons.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-23 22:31:36 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-23 22:51:52 -0700
commit8d5ac5da75b853e833c7ad5f18ce468eebc2aa0b (patch)
treeb64b7a6d9abc8fa3559a5a36829f1c73c1af7b06 /icons.lua
parentb3251b23b5af380a1c5eb4bb3d2699acb934879b (diff)
downloadlines.love-8d5ac5da75b853e833c7ad5f18ce468eebc2aa0b.tar.gz
keep one screen line of overlap on pagedown
I'm now extracting the concern of computing
line.screen_line_starting_pos out of Text.draw. Earlier
I had to make sure I ran through the whole line to compute
screen_line_starting_pos, but that had the side-effect of updating
Screen_bottom1.pos as well with lines that had never been rendered.

In this process I hit my first bug due to an accidental global. It
doesn't show up in the patch because I accidentally deleted a local
declaration. (I thought I didn't need screen_line_starting_pos anymore,
deleted everywhere, then brought it back everywhere from the bottom of
the function up, but forgot to put back the very first occurrence.)

The amount of yoyoing this caused between App.draw and Text.draw, I very
much have spaghetti on my hands.

Accidental globals are _terrible_ in a program with tests. Cross test
contamination X-(
Diffstat (limited to 'icons.lua')
0 files changed, 0 insertions, 0 deletions