From 1f55fec94bc92793f1c5e3565e0f76b9403435dc Mon Sep 17 00:00:00 2001 From: rxi Date: Wed, 13 May 2020 09:28:56 +0100 Subject: [PATCH] Fixed triple-clicking on last line not selecting the line --- data/core/docview.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/core/docview.lua b/data/core/docview.lua index 9c91b999..b372acf6 100644 --- a/data/core/docview.lua +++ b/data/core/docview.lua @@ -202,6 +202,9 @@ function DocView:on_mouse_pressed(button, x, y, clicks) local line2, col2 = translate.end_of_word(self.doc, line, col) self.doc:set_selection(line2, col2, line1, col1) elseif clicks == 3 then + if line == #self.doc.lines then + self.doc:insert(math.huge, math.huge, "\n") + end self.doc:set_selection(line + 1, 1, line, 1) else self.doc:set_selection(line, col)