diff --git a/frontend/ui/widget/inputtext.lua b/frontend/ui/widget/inputtext.lua index f5179832f..9892763f8 100644 --- a/frontend/ui/widget/inputtext.lua +++ b/frontend/ui/widget/inputtext.lua @@ -301,13 +301,13 @@ end function InputText:upLine() if self.text_widget.moveCursorUp then - self.text_widget:moveCursorUp() + self.charpos = self.text_widget:moveCursorUp() end end function InputText:downLine() if self.text_widget.moveCursorDown then - self.text_widget:moveCursorDown() + self.charpos = self.text_widget:moveCursorDown() end end diff --git a/frontend/ui/widget/scrolltextwidget.lua b/frontend/ui/widget/scrolltextwidget.lua index 01f435a2d..2a23223e2 100644 --- a/frontend/ui/widget/scrolltextwidget.lua +++ b/frontend/ui/widget/scrolltextwidget.lua @@ -96,6 +96,14 @@ function ScrollTextWidget:moveCursor(x, y) return self.text_widget:moveCursor(x, y) end +function ScrollTextWidget:moveCursorUp() + return self.text_widget:moveCursorUp(); +end + +function ScrollTextWidget:moveCursorDown() + return self.text_widget:moveCursorDown(); +end + function ScrollTextWidget:scrollText(direction) if direction == 0 then return end local low, high diff --git a/frontend/ui/widget/textboxwidget.lua b/frontend/ui/widget/textboxwidget.lua index c5e3874d4..83308187a 100644 --- a/frontend/ui/widget/textboxwidget.lua +++ b/frontend/ui/widget/textboxwidget.lua @@ -675,6 +675,7 @@ function TextBoxWidget:moveCursorUp() if charpos then self:moveCursorToCharpos(charpos) end + return charpos end function TextBoxWidget:moveCursorDown() @@ -685,6 +686,7 @@ function TextBoxWidget:moveCursorDown() if charpos then self:moveCursorToCharpos(charpos) end + return charpos end function TextBoxWidget:paintTo(bb, x, y)