diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-08-15 10:31:56 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-08-15 11:00:35 -0700 |
commit | a655c2113cdc80095402243ce41e1322dea535ab (patch) | |
tree | 87fcd7af0242e1791c732c14f47556653cc02f87 /edit.lua | |
parent | 778f77a4585c538211f79e717bae35fd650eee90 (diff) | |
download | view.love-a655c2113cdc80095402243ce41e1322dea535ab.tar.gz |
bring back a level of wrapping
Many projects will require the ability to add metadata to lines, so let's not drop that.
Diffstat (limited to 'edit.lua')
-rw-r--r-- | edit.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/edit.lua b/edit.lua index 1b888a8..2b23769 100644 --- a/edit.lua +++ b/edit.lua @@ -18,7 +18,7 @@ edit = {} -- run in both tests and a real run function edit.initialize_state(top, left, right, font_height, line_height) -- currently always draws to bottom of screen local result = { - lines = {''}, -- array of strings + lines = {{data=''}}, -- array of strings -- Lines can be too long to fit on screen, in which case they _wrap_ into -- multiple _screen lines_. @@ -106,7 +106,7 @@ function edit.draw(State) if State.cursor_y == -1 then State.cursor_y = App.screen.height end ---? print('screen bottom: '..tostring(State.screen_bottom1.pos)..' in '..tostring(State.lines[State.screen_bottom1.line])) +--? print('screen bottom: '..tostring(State.screen_bottom1.pos)..' in '..tostring(State.lines[State.screen_bottom1.line].data)) if State.search_term then Text.draw_search_bar(State) end |