improve commands for new onScreenChanged trigger
This commit is contained in:
parent
02520c9739
commit
2cd218f3e7
@ -22,9 +22,6 @@ class command():
|
||||
# detect deletion or chilling
|
||||
if self.env['screenData']['newCursor']['x'] <= self.env['screenData']['oldCursor']['x']:
|
||||
return
|
||||
# TTY Change
|
||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
||||
return
|
||||
# is there any change?
|
||||
if self.env['screenData']['newDelta'] == '':
|
||||
return
|
||||
|
@ -30,11 +30,7 @@ class command():
|
||||
return
|
||||
if len(self.env['screenData']['newDelta']) > 1:
|
||||
return
|
||||
|
||||
# TTY Change is no new word
|
||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
||||
return
|
||||
|
||||
|
||||
# first place could not be the end of a word
|
||||
if self.env['screenData']['newCursor']['x'] == 0:
|
||||
return
|
||||
|
@ -51,10 +51,6 @@ class command():
|
||||
if len(self.env['screenData']['newDelta']) > 1:
|
||||
return
|
||||
|
||||
# TTY Change is no new word
|
||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
||||
return
|
||||
|
||||
# first place could not be the end of a word
|
||||
if self.env['screenData']['newCursor']['x'] == 0:
|
||||
return
|
||||
|
@ -24,10 +24,6 @@ class command():
|
||||
if self.env['screenData']['newCursor']['x'] >= self.env['screenData']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# TTY change
|
||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
||||
return
|
||||
|
||||
# More than just a deletion happend
|
||||
if self.env['screenData']['newDelta'].strip() != '':
|
||||
if self.env['screenData']['newDelta'] != self.env['screenData']['oldDelta']:
|
||||
|
@ -22,9 +22,7 @@ class command():
|
||||
# is there something to read?
|
||||
if self.env['screenData']['newDelta'] == '':
|
||||
return
|
||||
# dont read TTY change
|
||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
||||
return
|
||||
|
||||
# its a cursor movement (experimental) - maybe also check current shortcut string?
|
||||
if abs(self.env['screenData']['newCursor']['x'] - self.env['screenData']['oldCursor']['x']) >= 1:
|
||||
if len(self.env['screenData']['newDelta']) <= 5:
|
||||
|
@ -22,8 +22,6 @@ class command():
|
||||
return
|
||||
if self.env['runtime']['settingsManager'].getSetting('promote', 'list').strip(" \t\n") == '':
|
||||
return
|
||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
||||
return
|
||||
if self.env['screenData']['newDelta'] == '':
|
||||
return
|
||||
if int(time.time() - self.env['input']['lastInputTime']) < self.env['runtime']['settingsManager'].getSettingAsInt('promote', 'inactiveTimeoutSec'):
|
||||
|
Loading…
Reference in New Issue
Block a user