diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-07-08 15:07:55 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-07-08 15:12:17 -0700 |
commit | e39269b19ed4a02e088f2cf8522ea8d06e00375b (patch) | |
tree | 337ac1187d6833f0a4ed195b5e1fa96400485488 /main.lua | |
parent | 8efdb898c6092e070900ae8ce13fb31ab321d5f8 (diff) | |
download | text.love-e39269b19ed4a02e088f2cf8522ea8d06e00375b.tar.gz |
start passing left/right margins everywhere
I have a set of changes that passes all tests, but I'm going to commit them very carefully to ensure I don't miss any call-sites. In this commit I'm adding the args to: - Text.draw - Text.tweak_screen_top_and_cursor But calls within them don't yet pass them where they should. In this manner I'm going to progress systematically from the top down.
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main.lua b/main.lua index b95fb00..2c79b77 100644 --- a/main.lua +++ b/main.lua @@ -191,7 +191,7 @@ function App.resize(w, h) App.screen.width, App.screen.height = w, h Text.redraw_all() Selection1 = {} -- no support for shift drag while we're resizing - Text.tweak_screen_top_and_cursor() + Text.tweak_screen_top_and_cursor(Margin_left, App.screen.height-Margin_right) Last_resize_time = App.getTime() end @@ -272,7 +272,7 @@ function App.draw() line.startpos = Screen_top1.pos end --? print('text.draw', y, line_index) - y, Screen_bottom1.pos = Text.draw(line, line_index) + y, Screen_bottom1.pos = Text.draw(line, line_index, line.starty, Margin_left, App.screen.width-Margin_right) y = y + Line_height --? print('=> y', y) end |