From 515dad95f92a9713463d5e0f485e448e6022f04f Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 22 Jun 2022 21:08:17 -0700 Subject: keep drawings within the line width slider as well --- text_tests.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'text_tests.lua') 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() -- cgit 1.4.1-2-gfad0