diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-06-22 21:08:17 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-06-22 21:08:17 -0700 |
commit | 515dad95f92a9713463d5e0f485e448e6022f04f (patch) | |
tree | 07a7c720bff847124ab204f73a1e782cc775a3d0 /text_tests.lua | |
parent | 39913ddbb847ba607554da2549795fe89143307d (diff) | |
download | lines.love-515dad95f92a9713463d5e0f485e448e6022f04f.tar.gz |
keep drawings within the line width slider as well
Diffstat (limited to 'text_tests.lua')
-rw-r--r-- | text_tests.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/text_tests.lua b/text_tests.lua index 0119223..dc5c0ff 100644 --- a/text_tests.lua +++ b/text_tests.lua @@ -530,7 +530,8 @@ end function test_pagedown_skips_drawings() io.write('\ntest_pagedown_skips_drawings') -- some lines of text with a drawing intermixed - App.screen.init{width=50, height=80} + local drawing_width = 50 + App.screen.init{width=Margin_left+drawing_width, height=80} Lines = load_array{'abc', -- height 15 '```lines', '```', -- height 25 'def', -- height 15 @@ -540,7 +541,7 @@ function test_pagedown_skips_drawings() Cursor1 = {line=1, pos=1} Screen_top1 = {line=1, pos=1} Screen_bottom1 = {} - local drawing_height = Drawing_padding_height + App.screen.width / 2 -- default + local drawing_height = Drawing_padding_height + drawing_width/2 -- default -- initially the screen displays the first line and the drawing -- 15px margin + 15px line1 + 10px margin + 25px drawing + 10px margin = 75px < screen height 80px App.draw() |