add review_line_last_char

This commit is contained in:
chrys
2016-10-02 18:08:21 +02:00
parent 09a4d60e0a
commit 0d2c095b62
5 changed files with 47 additions and 1 deletions

View File

@@ -28,6 +28,16 @@ def getCurrentChar(currX,currY, currText):
currChar = wrappedLines[currY][currX]
return currX, currY, currChar
def getLastCharInLine(currY, currText):
if currText == '':
return -1, -1, ''
wrappedLines = currText.split('\n')
currX = len(wrappedLines[currY].rstrip())-1
if currX < 0:
currX = 0
currChar = wrappedLines[currY][currX]
return currX, currY, currChar
def getNextChar(currX,currY, currText):
if currText == '':
return -1, -1, ''