remove re.sub

This commit is contained in:
chrys
2017-11-10 20:08:58 +01:00
parent 553f5dc456
commit 09a07ab11e
3 changed files with 11 additions and 6 deletions

View File

@@ -24,8 +24,9 @@ class command():
return
# More than just a deletion happend
if self.env['runtime']['screenManager'].isDelta():
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
return
# no deletion
if not self.env['runtime']['screenManager'].isNegativeDelta():
return
@@ -33,7 +34,8 @@ class command():
# too much for a single backspace...
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
if len(self.env['screen']['newNegativeDelta']) > 2:
return
return
currNegativeDelta = self.env['screen']['newNegativeDelta']
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
currNegativeDelta.strip() != '':