about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-14 09:05:02 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-14 09:05:02 -0700
commitc1d8201d4436b7d2544b79dbe0465558f887fd18 (patch)
tree22a39ec7832fba7b2d164627c7583870bb22029f /text.lua
parent4c39c436bfdebcf962051ad6ab7b574b33c53df9 (diff)
downloadview.love-c1d8201d4436b7d2544b79dbe0465558f887fd18.tar.gz
mouse buttons are integers, not strings
Not sure where that idiom comes from or why strings work in some places
(auto-coercion?). I picked it up off some example apps. But
https://love2d.org/wiki/love.mouse.isDown says it should be an integer.
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 a31f07c..0940776 100644
--- a/text.lua
+++ b/text.lua
@@ -138,7 +138,7 @@ function Text.compute_fragments(line, line_width)
 end
 
 function Text.textinput(t)
-  if App.mouse_down('1') then return end
+  if App.mouse_down(1) then return end
   if App.ctrl_down() or App.alt_down() or App.cmd_down() then return end
   if Selection1.line then
     Text.delete_selection()