mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
InputText: up/down arrows move cursor to start/end of line (#7976)
when already on the first or last line.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user