From c1d8201d4436b7d2544b79dbe0465558f887fd18 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 14 Jun 2022 09:05:02 -0700 Subject: 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. --- text.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'text.lua') 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() -- cgit 1.4.1-2-gfad0