diff options
-rw-r--r-- | text.lua | 7 |
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] |