diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-07-17 10:06:39 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-07-17 10:06:39 -0700 |
commit | 64eed749809a4412a6663d149cd57a41431df91d (patch) | |
tree | b51ab0593c43a60cb64ca86c0b23b5c42b9f36e5 /edit.lua | |
parent | 4ff6de99511e0b4c52acc49ec44d773aca63a2fd (diff) | |
download | text.love-64eed749809a4412a6663d149cd57a41431df91d.tar.gz |
keep all text cache writes inside text.lua
Diffstat (limited to 'edit.lua')
-rw-r--r-- | edit.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/edit.lua b/edit.lua index 17bbc9e..c0b2f8e 100644 --- a/edit.lua +++ b/edit.lua @@ -130,10 +130,9 @@ function edit.draw(State) State.screen_bottom1.line = line_index if line.mode == 'text' then --? print('text.draw', y, line_index) - line.starty = y - line.startpos = 1 + local startpos = 1 if line_index == State.screen_top1.line then - line.startpos = State.screen_top1.pos + startpos = State.screen_top1.pos end if line.data == '' then -- button to insert new drawing @@ -150,7 +149,7 @@ function edit.draw(State) end, }) end - y, State.screen_bottom1.pos = Text.draw(State, line_index) + y, State.screen_bottom1.pos = Text.draw(State, line_index, y, startpos) y = y + State.line_height --? print('=> y', y) elseif line.mode == 'drawing' then |