InputText: up/down arrows move cursor to start/end of line (#7976)

when already on the first or last line.
pull/7980/head
hius07 3 years ago committed by GitHub
parent 4b7ac191dc
commit 5947085ba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1711,13 +1711,11 @@ function TextBoxWidget:moveCursorRight()
end
function TextBoxWidget:moveCursorUp()
if self.vertical_string_list and #self.vertical_string_list < 2 then return end
local x, y = self:_getXYForCharPos()
self:moveCursorToXY(x, y - self.line_height_px)
end
function TextBoxWidget:moveCursorDown()
if self.vertical_string_list and #self.vertical_string_list < 2 then return end
local x, y = self:_getXYForCharPos()
self:moveCursorToXY(x, y + self.line_height_px)
end

Loading…
Cancel
Save