about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-21 16:53:54 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-21 16:55:05 -0700
commit0251b3f0c2b71a880734d0011c272cadaf3d5d51 (patch)
treea211ad276597da52c025c9b716a8ea7bd2e7b086 /text.lua
parent1937379da31f4c2f4d2635ea3ad9c4cda074e1fe (diff)
downloadtext.love-0251b3f0c2b71a880734d0011c272cadaf3d5d51.tar.gz
bugfix: search
Broken since commit 188bbc73 9 days ago :/ At least we have a test for
it now.
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/text.lua b/text.lua
index b00a08b..3490f7c 100644
--- a/text.lua
+++ b/text.lua
@@ -51,7 +51,7 @@ function Text.draw(State, line_index, y, startpos)
         if pos <= State.cursor1.pos and pos + frag_len > State.cursor1.pos then
           if State.search_term then
             if State.lines[State.cursor1.line].data:sub(State.cursor1.pos, State.cursor1.pos+utf8.len(State.search_term)-1) == State.search_term then
-              local lo_px = Text.draw_highlight(line, x,y, pos, State.cursor1.pos, State.cursor1.pos+utf8.len(State.search_term))
+              local lo_px = Text.draw_highlight(State, line, x,y, pos, State.cursor1.pos, State.cursor1.pos+utf8.len(State.search_term))
               App.color(Text_color)
               love.graphics.print(State.search_term, x+lo_px,y)
             end