Update modules/game_textwindow/textwindow.lua

Scrolling over empty lines fixed.
This commit is contained in:
TheSumm 2012-10-03 19:03:56 +03:00
parent d75841e085
commit faa6a51ac4
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ function onGameEditText(id, itemId, maxLength, text, writter, time)
textEdit:setCursorPos(getCursorPosByNewLine(textEdit:getText(), _next + delta - 1))
if writeable then textEdit:setCursorPos(getCursorPosByNewLine(textEdit:getText(), line + delta)) end
else
textEdit:setCursorPos(getCursorPosByNewLine(textEdit:getText(), _prev + delta + 1))
textEdit:setCursorPos(getCursorPosByNewLine(textEdit:getText(), _prev + delta + 1) - 1)
if writeable then textEdit:setCursorPos(getCursorPosByNewLine(textEdit:getText(), line + delta)) end
end