about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-08-15 10:31:56 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-08-15 11:00:35 -0700
commita655c2113cdc80095402243ce41e1322dea535ab (patch)
tree87fcd7af0242e1791c732c14f47556653cc02f87 /edit.lua
parent778f77a4585c538211f79e717bae35fd650eee90 (diff)
downloadview.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.lua4
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
d='n153' href='#n153'>153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281