bugfixing

This commit is contained in:
chrys 2016-08-06 05:23:32 +02:00
parent e797d8dd97
commit cea7fe6c5b

View File

@ -10,17 +10,19 @@ class command():
environment['screenData']['newCursor']['x'] <= environment['screenData']['oldCursor']['x']:
return environment
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
return environment
#if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
# return environment
#print('drin')
if environment['screenData']['newDelta'] == environment['screenData']['oldDelta']:
return environment
newContent = environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']]
x, y, currWord = word_utils.getCurrentWord(environment['screenData']['newCursorReview']['x'], 0, newContent)
x, y, currWord = word_utils.getCurrentWord(environment['screenData']['newCursor']['x'], 0, newContent)
print(len(currWord) + x + 2, environment['screenData']['newCursor']['x'],'|',newContent[environment['screenData']['newCursor']['x'] - 1],'|',x, y, currWord)
print(newContent )
#len(currWord) + x + 2 == environment['screenData']['newCursor']['x']:
if environment['screenData']['newCursor']['x'] > 0 and \
newContent[environment['screenData']['newCursor']['x'] - 1] == ' ':
newContent[environment['screenData']['newCursor']['x']- 1] == ' ':
environment['runtime']['outputManager'].presentText(environment, currWord, interrupt=True)
print('word')
return environment