about summary refs log tree commit diff stats
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/main.lua b/main.lua
index de75045..6873352 100644
--- a/main.lua
+++ b/main.lua
@@ -1,4 +1,5 @@
 utf8 = require 'utf8'
+json = require 'json'
 
 require 'app'
 require 'test'
@@ -43,13 +44,9 @@ function App.initialize(arg)
     Text.redraw_all(Editor_state)
     Editor_state.screen_top1 = {line=1, pos=1}
     Editor_state.cursor1 = {line=1, pos=1}
-    edit.fixup_cursor(Editor_state)
   else
     load_from_disk(Editor_state)
     Text.redraw_all(Editor_state)
-    if Editor_state.cursor1.line > #Editor_state.lines or Editor_state.lines[Editor_state.cursor1.line].mode ~= 'text' then
-      edit.fixup_cursor(Editor_state)
-    end
   end
   love.window.setTitle('lines.love - '..Editor_state.filename)
 
@@ -127,7 +124,6 @@ function App.filedropped(file)
   file:open('r')
   Editor_state.lines = load_from_file(file)
   file:close()
-  edit.fixup_cursor(Editor_state)
   love.window.setTitle('lines.love - '..Editor_state.filename)
 end