Update spell_check.py
This commit is contained in:
parent
cfd17f1bd9
commit
3a5c37ff6a
@ -23,9 +23,6 @@ class command():
|
|||||||
spellChecker = enchant.Dict(environment['runtime']['settingsManager'].getSetting(environment, 'general', 'spellCheckLanguage'))
|
spellChecker = enchant.Dict(environment['runtime']['settingsManager'].getSetting(environment, 'general', 'spellCheckLanguage'))
|
||||||
except:
|
except:
|
||||||
return environment
|
return environment
|
||||||
|
|
||||||
if not newContent[environment['screenData']['newCursor']['x']].strip() == '':
|
|
||||||
return environment
|
|
||||||
|
|
||||||
if (environment['screenData']['newCursorReview'] != None):
|
if (environment['screenData']['newCursorReview'] != None):
|
||||||
cursorPos = environment['screenData']['newCursorReview'].copy()
|
cursorPos = environment['screenData']['newCursorReview'].copy()
|
||||||
@ -34,7 +31,7 @@ class command():
|
|||||||
|
|
||||||
# get the word
|
# get the word
|
||||||
newContent = environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']]
|
newContent = environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']]
|
||||||
x, y, currWord = word_utils.getCurrentWord(cursorPos['x'], cursorPos['y'], newContent)
|
x, y, currWord = word_utils.getCurrentWord(cursorPos['x'], 0, newContent)
|
||||||
|
|
||||||
if currWord != '':
|
if currWord != '':
|
||||||
if not spellChecker.check(currWord):
|
if not spellChecker.check(currWord):
|
||||||
|
Loading…
Reference in New Issue
Block a user