Update word_utils.py
This commit is contained in:
parent
a78cb62620
commit
0e4435802e
@ -12,7 +12,7 @@ def getPrevWord(currX,currY, currText):
|
|||||||
endOfScreen = False
|
endOfScreen = False
|
||||||
if currText == '':
|
if currText == '':
|
||||||
return -1, -1, '', endOfScreen, lineBreak
|
return -1, -1, '', endOfScreen, lineBreak
|
||||||
if currText.strip(string.punctuation +"§ " + string.whitespace) == '':
|
if currText.strip(string.whitespace) == '':
|
||||||
return currX, currY, '', endOfScreen, lineBreak
|
return currX, currY, '', endOfScreen, lineBreak
|
||||||
x, y, currWord, endOfScreen, lineBreakCurrWord = getCurrentWord(currX,currY,currText)
|
x, y, currWord, endOfScreen, lineBreakCurrWord = getCurrentWord(currX,currY,currText)
|
||||||
if endOfScreen:
|
if endOfScreen:
|
||||||
@ -41,7 +41,7 @@ def getCurrentWord(currX,currY, currText):
|
|||||||
endOfScreen = False
|
endOfScreen = False
|
||||||
if currText == '':
|
if currText == '':
|
||||||
return -1, -1, '', endOfScreen, lineBreak
|
return -1, -1, '', endOfScreen, lineBreak
|
||||||
if currText.strip(string.punctuation +"§ " + string.whitespace) == '':
|
if currText.strip(string.whitespace) == '':
|
||||||
return currX, currY, '', endOfScreen, lineBreak
|
return currX, currY, '', endOfScreen, lineBreak
|
||||||
x = currX
|
x = currX
|
||||||
y = currY
|
y = currY
|
||||||
@ -84,7 +84,7 @@ def getNextWord(currX,currY, currText):
|
|||||||
endOfScreen = False
|
endOfScreen = False
|
||||||
if currText == '':
|
if currText == '':
|
||||||
return -1, -1, '', endOfScreen, lineBreak
|
return -1, -1, '', endOfScreen, lineBreak
|
||||||
if currText.strip(string.punctuation +"§ " + string.whitespace) == '':
|
if currText.strip(string.whitespace) == '':
|
||||||
return currX, currY, '', endOfScreen, lineBreak
|
return currX, currY, '', endOfScreen, lineBreak
|
||||||
x = currX
|
x = currX
|
||||||
y = currY
|
y = currY
|
||||||
|
Loading…
Reference in New Issue
Block a user