diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-05-23 22:31:36 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-05-23 22:51:52 -0700 |
commit | 8d5ac5da75b853e833c7ad5f18ce468eebc2aa0b (patch) | |
tree | b64b7a6d9abc8fa3559a5a36829f1c73c1af7b06 /icons.lua | |
parent | b3251b23b5af380a1c5eb4bb3d2699acb934879b (diff) | |
download | lines.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