From f08897788d45e4bcdbab9ca5bf5dabf5ee4e7fd9 Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 20 Oct 2017 03:13:08 +0200 Subject: [PATCH] fix fragmentation for 'fake input' --- src/fenrir/screenDriver/vcsaDriver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fenrir/screenDriver/vcsaDriver.py b/src/fenrir/screenDriver/vcsaDriver.py index 1d02e96d..1991be1d 100644 --- a/src/fenrir/screenDriver/vcsaDriver.py +++ b/src/fenrir/screenDriver/vcsaDriver.py @@ -338,15 +338,15 @@ class driver(): 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]: cursorLineStartOffset = cursorLineStart cursorLineEndOffset = cursorLineEnd #if cursorLineStart < cursorLineStart + self.env['screen']['newCursor']['x'] - 4: # cursorLineStartOffset = cursorLineStart + self.env['screen']['newCursor']['x'] - 4 - if cursorLineEnd > cursorLineStart + self.env['screen']['newCursor']['x'] + 4: - cursorLineEndOffset = cursorLineStart + self.env['screen']['newCursor']['x'] + 4 + if cursorLineEnd > cursorLineStart + self.env['screen']['newCursor']['x'] + 3: + cursorLineEndOffset = cursorLineStart + self.env['screen']['newCursor']['x'] + 3 oldScreenText = self.env['screen']['oldContentText'][cursorLineStartOffset:cursorLineEndOffset] oldScreenText = re.sub(' +',' ',oldScreenText) newScreenText = self.env['screen']['newContentText'][cursorLineStartOffset:cursorLineEndOffset]