about summary refs log tree commit diff stats
path: root/search.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2024-01-12 05:23:06 -0800
committerKartik K. Agaram <vc@akkartik.com>2024-01-12 05:23:06 -0800
commit95d88a8298142a996bf828734f7e986d2f99f9ab (patch)
tree9c40bed2ae1462c3f502c57d40249482948d0a1a /search.lua
parent4121613fc678d71acaa6213300dac3c321530589 (diff)
downloadlines.love-95d88a8298142a996bf828734f7e986d2f99f9ab.tar.gz
use editor state font for width calculations
Diffstat (limited to 'search.lua')
-rw-r--r--search.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/search.lua b/search.lua
index 67b82b3..54bab14 100644
--- a/search.lua
+++ b/search.lua
@@ -13,7 +13,7 @@ function Text.draw_search_bar(State)
   love.graphics.rectangle('line', 20, y-6, App.screen.width-40, h+2, 2,2)
   App.color(Text_color)
   App.screen.print(State.search_term, 25,y-5)
-  Text.draw_cursor(State, 25+App.width(State.search_term),y-5)
+  Text.draw_cursor(State, 25+State.font:getWidth(State.search_term),y-5)
 end
 
 function Text.search_next(State)