about summary refs log tree commit diff stats
path: root/source.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-03-17 21:46:42 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-03-17 21:48:29 -0700
commit8c373fdb60620747c7997819538037df190335c0 (patch)
tree6a1ba443b458c9f10d905acfb5dab2aaa1eda796 /source.lua
parentae429cd78a1f52272d5f51991ebb9b04b542ce01 (diff)
downloadlines.love-8c373fdb60620747c7997819538037df190335c0.tar.gz
get rid of all bifold text
It's just uneconomic to maintain given how little I've used it. I have a
bug right now and no time to port the bugfix to all the complexities of
the B side.

I briefly considered tossing out the entire source editor. But I _have_
been using it to browse logs across sessions. The live editor doesn't
quite cover all my use cases just yet.

We now have duplication in the source editor only for:
* syntax highlighting
* hyperlinking [[WikiWords]]
* ability to hide cursor (when showing file browser or Focus is in log browser)
Diffstat (limited to 'source.lua')
-rw-r--r--source.lua14
1 files changed, 1 insertions, 13 deletions
diff --git a/source.lua b/source.lua
index d0836cb..f224459 100644
--- a/source.lua
+++ b/source.lua
@@ -75,7 +75,7 @@ function source.initialize()
   love.window.setTitle('lines.love - source')
 end
 
--- environment for a mutable file of bifolded text
+-- environment for a mutable file
 -- TODO: some initialization is also happening in load_settings/initialize_default_settings. Clean that up.
 function source.initialize_edit_side()
   load_from_disk(Editor_state)
@@ -89,17 +89,12 @@ function source.initialize_edit_side()
   end
   edit.check_locs(Editor_state)
 
-  -- We currently start out with side B collapsed.
-  -- Other options:
-  --  * save all expanded state by line
-  --  * expand all if any location is in side B
   if Editor_state.cursor1.line > #Editor_state.lines then
     Editor_state.cursor1 = {line=1, pos=1}
   end
   if Editor_state.screen_top1.line > #Editor_state.lines then
     Editor_state.screen_top1 = {line=1, pos=1}
   end
-  edit.eradicate_locations_after_the_fold(Editor_state)
 
   if rawget(_G, 'jit') then
     jit.off()
@@ -253,13 +248,6 @@ end
 function source.quit()
   edit.quit(Editor_state)
   log_browser.quit(Log_browser_state)
-  -- convert any bifold files here
-end
-
-function source.convert_bifold_text(infilename, outfilename)
-  local contents = love.filesystem.read(infilename)
-  contents = contents:gsub('\u{1e}', ';')
-  love.filesystem.write(outfilename, contents)
 end
 
 function source.settings()