diff --git a/main.lua b/main.lua index ed4fffa..f7f1e35 100644 --- a/main.lua +++ b/main.lua @@ -493,7 +493,7 @@ end function love.textinput(t) if love.mouse.isDown('1') then return end - if in_drawing() then return end + if mouse_in_drawing() then return end local byteoffset if cursor_pos > 1 then byteoffset = utf8.offset(lines[cursor_line], cursor_pos-1) @@ -749,7 +749,7 @@ function nearest_cursor_pos(line, x, hint) return right end -function in_drawing() +function mouse_in_drawing() local x, y = love.mouse.getX(), love.mouse.getY() for _,drawing in ipairs(lines) do if type(drawing) == 'table' then