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
|
# detect deletion or chilling
|
||||||
if self.env['screenData']['newCursor']['x'] <= self.env['screenData']['oldCursor']['x']:
|
if self.env['screenData']['newCursor']['x'] <= self.env['screenData']['oldCursor']['x']:
|
||||||
return
|
return
|
||||||
# TTY Change
|
|
||||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
|
||||||
return
|
|
||||||
# is there any change?
|
# is there any change?
|
||||||
if self.env['screenData']['newDelta'] == '':
|
if self.env['screenData']['newDelta'] == '':
|
||||||
return
|
return
|
||||||
|
@ -31,10 +31,6 @@ class command():
|
|||||||
if len(self.env['screenData']['newDelta']) > 1:
|
if len(self.env['screenData']['newDelta']) > 1:
|
||||||
return
|
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
|
# first place could not be the end of a word
|
||||||
if self.env['screenData']['newCursor']['x'] == 0:
|
if self.env['screenData']['newCursor']['x'] == 0:
|
||||||
return
|
return
|
||||||
|
@ -51,10 +51,6 @@ class command():
|
|||||||
if len(self.env['screenData']['newDelta']) > 1:
|
if len(self.env['screenData']['newDelta']) > 1:
|
||||||
return
|
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
|
# first place could not be the end of a word
|
||||||
if self.env['screenData']['newCursor']['x'] == 0:
|
if self.env['screenData']['newCursor']['x'] == 0:
|
||||||
return
|
return
|
||||||
|
@ -24,10 +24,6 @@ class command():
|
|||||||
if self.env['screenData']['newCursor']['x'] >= self.env['screenData']['oldCursor']['x']:
|
if self.env['screenData']['newCursor']['x'] >= self.env['screenData']['oldCursor']['x']:
|
||||||
return
|
return
|
||||||
|
|
||||||
# TTY change
|
|
||||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
|
||||||
return
|
|
||||||
|
|
||||||
# More than just a deletion happend
|
# More than just a deletion happend
|
||||||
if self.env['screenData']['newDelta'].strip() != '':
|
if self.env['screenData']['newDelta'].strip() != '':
|
||||||
if self.env['screenData']['newDelta'] != self.env['screenData']['oldDelta']:
|
if self.env['screenData']['newDelta'] != self.env['screenData']['oldDelta']:
|
||||||
|
@ -22,9 +22,7 @@ class command():
|
|||||||
# is there something to read?
|
# is there something to read?
|
||||||
if self.env['screenData']['newDelta'] == '':
|
if self.env['screenData']['newDelta'] == '':
|
||||||
return
|
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?
|
# 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 abs(self.env['screenData']['newCursor']['x'] - self.env['screenData']['oldCursor']['x']) >= 1:
|
||||||
if len(self.env['screenData']['newDelta']) <= 5:
|
if len(self.env['screenData']['newDelta']) <= 5:
|
||||||
|
@ -22,8 +22,6 @@ class command():
|
|||||||
return
|
return
|
||||||
if self.env['runtime']['settingsManager'].getSetting('promote', 'list').strip(" \t\n") == '':
|
if self.env['runtime']['settingsManager'].getSetting('promote', 'list').strip(" \t\n") == '':
|
||||||
return
|
return
|
||||||
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']:
|
|
||||||
return
|
|
||||||
if self.env['screenData']['newDelta'] == '':
|
if self.env['screenData']['newDelta'] == '':
|
||||||
return
|
return
|
||||||
if int(time.time() - self.env['input']['lastInputTime']) < self.env['runtime']['settingsManager'].getSettingAsInt('promote', 'inactiveTimeoutSec'):
|
if int(time.time() - self.env['input']['lastInputTime']) < self.env['runtime']['settingsManager'].getSettingAsInt('promote', 'inactiveTimeoutSec'):
|
||||||
|
Loading…
Reference in New Issue
Block a user