Update word_utils.py

This commit is contained in:
chrys87 2016-07-20 16:11:05 +02:00 committed by GitHub
parent 7ab45cca50
commit d8e22d97d3

View File

@ -3,6 +3,9 @@
def getCurrentWord(currX,currY, currText): def getCurrentWord(currX,currY, currText):
if currText == '': if currText == '':
return -1, -1, '' return -1, -1, ''
x = currX
y = currY
wrappedLines = currText.split('\n')
wordFound = False wordFound = False
currWord = '' currWord = ''
currLine = wrappedLines[y].replace("\t"," ") currLine = wrappedLines[y].replace("\t"," ")
@ -30,4 +33,4 @@ def getCurrentWord(currX,currY, currText):
x = len(wrappedLines[y]) - 1 x = len(wrappedLines[y]) - 1
else: else:
x -= 1 x -= 1
return x, y, currWord return x, y, currWord