This commit is contained in:
Igor Timofeev
2017-01-15 02:04:41 +03:00
parent 7832b06ba3
commit 30e360eb8f
4 changed files with 3 additions and 3 deletions

View File

@@ -158,9 +158,9 @@ end
local function moveCursor(symbolOffset, lineOffset)
local newSymbol, newLine = cursor.position.symbol + symbolOffset, cursor.position.line + lineOffset
if newSymbol < 1 then
if symbolOffset < 0 and newSymbol < 1 then
newLine, newSymbol = newLine - 1, math.huge
elseif newSymbol > unicode.len(mainWindow.codeView.lines[newLine] or "") + 1 then
elseif symbolOffset > 0 and newSymbol > unicode.len(mainWindow.codeView.lines[newLine] or "") + 1 then
newLine, newSymbol = newLine + 1, 1
end