Update 62000-spell_check.py
This commit is contained in:
parent
68c216a845
commit
cfd17f1bd9
@ -5,11 +5,11 @@ try:
|
|||||||
import enchant
|
import enchant
|
||||||
initialized = True
|
initialized = True
|
||||||
except:
|
except:
|
||||||
print('nööP')
|
pass
|
||||||
|
|
||||||
class command():
|
class command():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
self.language = ''
|
||||||
|
|
||||||
def run(self, environment):
|
def run(self, environment):
|
||||||
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'):
|
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'):
|
||||||
@ -17,7 +17,11 @@ class command():
|
|||||||
|
|
||||||
if not initialized:
|
if not initialized:
|
||||||
return environment
|
return environment
|
||||||
spellChecker = enchant.Dict(environment['runtime']['settingsManager'].getSetting(environment, 'general', 'spellCheckLanguage'))
|
if environment['runtime']['settingsManager'].getSetting(environment, 'general', 'spellCheckLanguage') != self.language:
|
||||||
|
try:
|
||||||
|
spellChecker = enchant.Dict(environment['runtime']['settingsManager'].getSetting(environment, 'general', 'spellCheckLanguage'))
|
||||||
|
except:
|
||||||
|
return environment
|
||||||
|
|
||||||
# just when cursor move worddetection is needed
|
# just when cursor move worddetection is needed
|
||||||
if environment['screenData']['newCursor']['x'] == environment['screenData']['oldCursor']['x']:
|
if environment['screenData']['newCursor']['x'] == environment['screenData']['oldCursor']['x']:
|
||||||
|
Loading…
Reference in New Issue
Block a user