From b850960ab6bf06377659ac31c1bd2d33ff38fe23 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 27 Aug 2017 19:22:38 +0200 Subject: [PATCH] fix history in combination with incomming messages --- .../onScreenUpdate/{deactive => }/60000-history.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) rename src/fenrir/commands/onScreenUpdate/{deactive => }/60000-history.py (89%) diff --git a/src/fenrir/commands/onScreenUpdate/deactive/60000-history.py b/src/fenrir/commands/onScreenUpdate/60000-history.py similarity index 89% rename from src/fenrir/commands/onScreenUpdate/deactive/60000-history.py rename to src/fenrir/commands/onScreenUpdate/60000-history.py index efdbe244..0ecea111 100644 --- a/src/fenrir/commands/onScreenUpdate/deactive/60000-history.py +++ b/src/fenrir/commands/onScreenUpdate/60000-history.py @@ -24,9 +24,12 @@ class command(): if self.env['runtime']['cursorManager'].isCursorVerticalMove(): return if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]): - return + return prevLine = self.env['screen']['oldContentText'].split('\n')[self.env['screen']['newCursor']['y']] - currLine = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] + currLine = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] + if prevLine == currLine: + if self.env['screen']['newDelta'] != '': + return if not currLine.isspace(): currPrompt = currLine.find('$') rootPrompt = currLine.find('#')