about summary refs log tree commit diff stats
path: root/select.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 /select.lua
parent4c39c436bfdebcf962051ad6ab7b574b33c53df9 (diff)
downloadtext.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 'select.lua')
-rw-r--r--select.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/select.lua b/select.lua
index 6425b06..839e770 100644
--- a/select.lua
+++ b/select.lua
@@ -13,7 +13,7 @@ function Text.clip_selection(line_index, apos, bpos)
   -- min,max = sorted(Selection1,Cursor1)
   local minl,minp = Selection1.line,Selection1.pos
   local maxl,maxp
-  if App.mouse_down('1') then
+  if App.mouse_down(1) then
     maxl,maxp = Text.mouse_pos()
   else
     maxl,maxp = Cursor1.line,Cursor1.pos