From 71c4ed88a50cc372958cdeddc1a81a23df2f125a Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 15 Jul 2016 16:41:19 +0200 Subject: [PATCH] add horizontal and vertical announcements --- src/fenrir-package/screen/linux.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fenrir-package/screen/linux.py b/src/fenrir-package/screen/linux.py index 73ef28d3..96593ed7 100644 --- a/src/fenrir-package/screen/linux.py +++ b/src/fenrir-package/screen/linux.py @@ -35,7 +35,7 @@ class screen(): return environment except: return environment - if trigger != 'onInput': + if trigger != 'onInput': # so we already moved the cursor and is not input -> screenchanges was faster if ((newContentBytes[2] != environment['screenData']['oldCursor']['x']) or\ (newContentBytes[3] != environment['screenData']['oldCursor']['y'])) and\ (newTTY == environment['screenData']['oldTTY']): @@ -51,7 +51,8 @@ class screen(): # analyze content environment['screenData']['newContentText'] = str(environment['screenData']['newContentBytes'][4:][::2].decode('WINDOWS-1250')) environment['screenData']['newContentAttrib'] = environment['screenData']['newContentBytes'][5:][::2] - environment['screenData']['newContentText'] = '\n'.join(self.textWrapper.wrap(environment['screenData']['newContentText'], ))[:-2] + if environment['screenData']['newContentText'].count('\n') == 0: + environment['screenData']['newContentText'] = '\n'.join(self.textWrapper.wrap(environment['screenData']['newContentText'], ))[:-2] if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']: self.textWrapper.width = environment['screenData']['columns']