about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-06-07 21:57:39 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-06-07 21:57:39 -0700
commit037fb843c86f34b640d32c9776971f8aa5e448e0 (patch)
tree284190934663d96d17adc004bf6bcb858074c1d1 /text.lua
parenta9c68776db3dde49e090f223ec098f04c62b588a (diff)
downloadview.love-037fb843c86f34b640d32c9776971f8aa5e448e0.tar.gz
stop showing the cursor
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/text.lua b/text.lua
index f25c7b3..63c559d 100644
--- a/text.lua
+++ b/text.lua
@@ -41,7 +41,7 @@ function Text.draw(State, line_index, y, startpos)
               love.graphics.print(State.search_term, State.left+lo_px,y)
             end
           else
-            Text.draw_cursor(State, State.left+Text.x(screen_line, State.cursor1.pos-pos+1), y)
+            Text.pretend_draw_cursor(State, State.left+Text.x(screen_line, State.cursor1.pos-pos+1), y)
           end
         end
       end
@@ -75,6 +75,11 @@ function Text.draw_cursor(State, x, y)
   State.cursor_y = y+State.line_height
 end
 
+function Text.pretend_draw_cursor(State, x, y)
+  State.cursor_x = x
+  State.cursor_y = y+State.line_height
+end
+
 function Text.populate_screen_line_starting_pos(State, line_index)
   local line = State.lines[line_index]
   local line_cache = State.line_cache[line_index]