Most of the pep8 changes finished. Be careful, things may be horribly broken.
This commit is contained in:
@ -18,12 +18,12 @@ class command():
|
||||
def shutdown(self):
|
||||
pass
|
||||
|
||||
def getDescription(self):
|
||||
def get_description(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# enabled?
|
||||
active = self.env['runtime']['settingsManager'].getSettingAsInt(
|
||||
active = self.env['runtime']['SettingsManager'].get_setting_as_int(
|
||||
'keyboard', 'charEchoMode')
|
||||
# 0 = off
|
||||
if active == 0:
|
||||
@ -35,36 +35,36 @@ class command():
|
||||
# big changes are no char (but the value is bigger than one maybe the
|
||||
# differ needs longer than you can type, so a little strange random
|
||||
# buffer for now)
|
||||
xMove = abs(
|
||||
self.env['screen']['newCursor']['x'] -
|
||||
self.env['screen']['oldCursor']['x'])
|
||||
if xMove > 3:
|
||||
x_move = abs(
|
||||
self.env['screen']['new_cursor']['x'] -
|
||||
self.env['screen']['old_cursor']['x'])
|
||||
if x_move > 3:
|
||||
return
|
||||
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||
if self.env['runtime']['inputManager'].getLastDeepestInput() in [
|
||||
if self.env['runtime']['InputManager'].get_shortcut_type() in ['KEY']:
|
||||
if self.env['runtime']['InputManager'].get_last_deepest_input() in [
|
||||
['KEY_TAB']]:
|
||||
return
|
||||
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||
if self.env['runtime']['byteManager'].getLastByteKey() in [
|
||||
elif self.env['runtime']['InputManager'].get_shortcut_type() in ['BYTE']:
|
||||
if self.env['runtime']['ByteManager'].get_last_byte_key() in [
|
||||
b' ', b'\t']:
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
if self.env['screen']['new_cursor']['x'] <= self.env['screen']['old_cursor']['x']:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
if not self.env['runtime']['ScreenManager'].is_delta():
|
||||
return
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(
|
||||
currDelta,
|
||||
curr_delta = self.env['screen']['new_delta']
|
||||
if len(curr_delta.strip()) != len(curr_delta) and \
|
||||
curr_delta.strip() != '':
|
||||
curr_delta = curr_delta.strip()
|
||||
self.env['runtime']['OutputManager'].present_text(
|
||||
curr_delta,
|
||||
interrupt=True,
|
||||
ignorePunctuation=True,
|
||||
announceCapital=True,
|
||||
ignore_punctuation=True,
|
||||
announce_capital=True,
|
||||
flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
def set_callback(self, callback):
|
||||
pass
|
||||
|
Reference in New Issue
Block a user