Fixed shift+click select behavior
This commit is contained in:
parent
53d555b362
commit
094cf0cc2c
|
@ -220,9 +220,9 @@ function DocView:on_mouse_pressed(button, x, y, clicks)
|
||||||
end
|
end
|
||||||
if keymap.modkeys["shift"] then
|
if keymap.modkeys["shift"] then
|
||||||
if clicks == 1 then
|
if clicks == 1 then
|
||||||
local line, col = self.doc:get_selection()
|
local line1, col1 = select(3, self.doc:get_selection())
|
||||||
self.mouse_selecting = { line, col, clicks = 1 }
|
local line2, col2 = self:resolve_screen_position(x, y)
|
||||||
self:on_mouse_moved(x, y)
|
self.doc:set_selection(line2, col2, line1, col1)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local line, col = self:resolve_screen_position(x, y)
|
local line, col = self:resolve_screen_position(x, y)
|
||||||
|
|
Loading…
Reference in a new issue