about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-08 15:39:51 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-08 15:43:45 -0700
commit9fb8f25030de2f9eff87003a1ff71e3bc5fdbc94 (patch)
tree8450a5989cf445d8fad71610249312929c6d14b1
parent00c64ed6e49fd679bb2d08dd076f585842bbf423 (diff)
downloadview.love-9fb8f25030de2f9eff87003a1ff71e3bc5fdbc94.tar.gz
indent
-rw-r--r--main.lua10
-rw-r--r--text.lua5
2 files changed, 12 insertions, 3 deletions
diff --git a/main.lua b/main.lua
index 08cad48..483f560 100644
--- a/main.lua
+++ b/main.lua
@@ -351,7 +351,10 @@ function App.mousepressed(x,y, mouse_button)
         Old_cursor1 = Cursor1
         Old_selection1 = Selection1
         Mousepress_shift = App.shift_down()
-        Selection1 = {line=line_index, pos=Text.to_pos_on_line(line, x, y)}
+        Selection1 = {
+            line=line_index,
+            pos=Text.to_pos_on_line(line, x, y),
+        }
 --?         print('selection', Selection1.line, Selection1.pos)
         break
       end
@@ -384,7 +387,10 @@ function App.mousereleased(x,y, button)
       if line.mode == 'text' then
         if Text.in_line(line, x,y, Margin_left, App.screen.width-Margin_right) then
 --?           print('reset selection')
-          Cursor1 = {line=line_index, pos=Text.to_pos_on_line(line, x, y)}
+          Cursor1 = {
+              line=line_index,
+              pos=Text.to_pos_on_line(line, x, y),
+          }
 --?           print('cursor', Cursor1.line, Cursor1.pos)
           if Mousepress_shift then
             if Old_selection1.line == nil then
diff --git a/text.lua b/text.lua
index 416b703..dbf1604 100644
--- a/text.lua
+++ b/text.lua
@@ -946,7 +946,10 @@ function Text.tweak_screen_top_and_cursor(left, right)
     if Text.cursor_past_screen_bottom() then
 --?       print('tweak')
       local line = Lines[Screen_bottom1.line]
-      Cursor1 = {line=Screen_bottom1.line, pos=Text.to_pos_on_line(line, App.screen.width-5, App.screen.height-5)}
+      Cursor1 = {
+          line=Screen_bottom1.line,
+          pos=Text.to_pos_on_line(line, App.screen.width-5, App.screen.height-5),
+      }
     end
   end
 end