strip whitespace
This commit is contained in:
parent
d6498f053c
commit
13742ba980
@ -36,7 +36,6 @@ class command():
|
|||||||
# is there any change?
|
# is there any change?
|
||||||
if not self.env['runtime']['screenManager'].isDelta():
|
if not self.env['runtime']['screenManager'].isDelta():
|
||||||
return
|
return
|
||||||
|
|
||||||
# filter unneded space on word begin
|
# filter unneded space on word begin
|
||||||
currDelta = self.env['screen']['newDelta']
|
currDelta = self.env['screen']['newDelta']
|
||||||
if len(currDelta.strip()) != len(currDelta) and \
|
if len(currDelta.strip()) != len(currDelta) and \
|
||||||
|
@ -15,7 +15,6 @@ class command():
|
|||||||
pass
|
pass
|
||||||
def getDescription(self):
|
def getDescription(self):
|
||||||
return 'No Description found'
|
return 'No Description found'
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
# try to detect the tab completion by cursor change
|
# try to detect the tab completion by cursor change
|
||||||
xMove = self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']
|
xMove = self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']
|
||||||
@ -32,7 +31,6 @@ class command():
|
|||||||
return
|
return
|
||||||
if not xMove == len(self.env['screen']['newDelta']):
|
if not xMove == len(self.env['screen']['newDelta']):
|
||||||
return
|
return
|
||||||
|
|
||||||
# filter unneded space on word begin
|
# filter unneded space on word begin
|
||||||
currDelta = self.env['screen']['newDelta']
|
currDelta = self.env['screen']['newDelta']
|
||||||
if len(currDelta.strip()) != len(currDelta) and \
|
if len(currDelta.strip()) != len(currDelta) and \
|
||||||
|
@ -14,12 +14,10 @@ class command():
|
|||||||
pass
|
pass
|
||||||
def getDescription(self):
|
def getDescription(self):
|
||||||
return _('enables or disables tracking of highlighted')
|
return _('enables or disables tracking of highlighted')
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'):
|
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'):
|
||||||
return
|
return
|
||||||
attributeDelta = self.env['runtime']['attributeManager'].getAttributeDelta()
|
attributeDelta = self.env['runtime']['attributeManager'].getAttributeDelta()
|
||||||
self.env['runtime']['outputManager'].presentText(attributeDelta, soundIcon='', interrupt=True, flush=False)
|
self.env['runtime']['outputManager'].presentText(attributeDelta, soundIcon='', interrupt=True, flush=False)
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
pass
|
pass
|
||||||
|
@ -31,7 +31,7 @@ class command():
|
|||||||
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||||
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]):
|
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]):
|
||||||
return
|
return
|
||||||
if self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||||
if not (self.env['runtime']['byteManager'].getLastByteKey() in [b'^[[A',b'^[[B']):
|
if not (self.env['runtime']['byteManager'].getLastByteKey() in [b'^[[A',b'^[[B']):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ class command():
|
|||||||
pass
|
pass
|
||||||
def getDescription(self):
|
def getDescription(self):
|
||||||
return 'No Description found'
|
return 'No Description found'
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('promote', 'enabled'):
|
if not self.env['runtime']['settingsManager'].getSettingAsBool('promote', 'enabled'):
|
||||||
return
|
return
|
||||||
@ -31,7 +30,6 @@ class command():
|
|||||||
self.env['runtime']['outputManager'].playSoundIcon('PromotedText')
|
self.env['runtime']['outputManager'].playSoundIcon('PromotedText')
|
||||||
self.env['input']['lastInputTime'] = time.time()
|
self.env['input']['lastInputTime'] = time.time()
|
||||||
return
|
return
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -15,15 +15,12 @@ class command():
|
|||||||
pass
|
pass
|
||||||
def getDescription(self):
|
def getDescription(self):
|
||||||
return 'No Description found'
|
return 'No Description found'
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
if not self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
||||||
return
|
return
|
||||||
if not self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
if not self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
||||||
return
|
return
|
||||||
|
|
||||||
self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
|
self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user