Revert "tweak line changes"

This reverts commit 64e29680ce.
This commit is contained in:
chrys 2017-11-10 21:36:04 +01:00
parent 64e29680ce
commit c30fedb0ea
4 changed files with 11 additions and 15 deletions

View File

@ -26,8 +26,7 @@ class command():
if not self.env['runtime']['screenManager'].isDelta():
return
# 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 not( (xMove >= 1) and xMove == len(self.env['screen']['newDelta'])):
if len(self.env['screen']['newDelta'].strip(' \n\t')) > 1:
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']

View File

@ -33,7 +33,6 @@ class command():
# is it a horizontal change?
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# echo word insteed of char
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:

View File

@ -20,18 +20,16 @@ class command():
if not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'):
return
# is there something to read?
if not self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
if not self.env['runtime']['screenManager'].isDelta():
return
# this must be a keyecho or something
#if len(self.env['screen']['newDelta'].strip(' \n\t')) <= 1:
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
yMove = abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y'])
if (xMove >= 1) and xMove == len(self.env['screen']['newDelta']):
if len(self.env['screen']['newDelta'].strip(' \n\t')) <= 1:
if abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) >= 1:
# if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2:
return
#if yMove == 1:
if abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y']) == 1:
# if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2:
# return
return
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=False, flush=False)
def setCallback(self, callback):

View File

@ -337,7 +337,7 @@ class driver(screenDriver):
else:
cursorLineStart = self.env['screen']['newCursor']['y'] * self.env['screen']['columns'] + self.env['screen']['newCursor']['y']
cursorLineEnd = cursorLineStart + self.env['screen']['columns']
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) >= 1 and \
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) == 1 and \
self.env['screen']['oldCursor']['y'] == self.env['screen']['newCursor']['y'] and \
self.env['screen']['newContentText'][:cursorLineStart] == self.env['screen']['oldContentText'][:cursorLineStart] and \
self.env['screen']['newContentText'][cursorLineEnd:] == self.env['screen']['oldContentText'][cursorLineEnd:]: