From 0e1e054416c15b8dc5df488ceaec7f3b7dc4f43d Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 25 Sep 2017 21:27:00 +0200 Subject: [PATCH] improve history --- src/fenrir/commands/onCursorChange/45000-char_echo.py | 2 +- src/fenrir/commands/onScreenUpdate/70000-incoming.py | 4 ++-- src/fenrir/screenDriver/vcsaDriver.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fenrir/commands/onCursorChange/45000-char_echo.py b/src/fenrir/commands/onCursorChange/45000-char_echo.py index 832263b2..e84eb6ef 100644 --- a/src/fenrir/commands/onCursorChange/45000-char_echo.py +++ b/src/fenrir/commands/onCursorChange/45000-char_echo.py @@ -26,7 +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) - if len(self.env['screen']['newDelta']) > 3: + if len(self.env['screen']['newDelta'].strip(' \n\t')) > 1: return # filter unneded space on word begin currDelta = self.env['screen']['newDelta'] diff --git a/src/fenrir/commands/onScreenUpdate/70000-incoming.py b/src/fenrir/commands/onScreenUpdate/70000-incoming.py index 863f6eae..17074a52 100644 --- a/src/fenrir/commands/onScreenUpdate/70000-incoming.py +++ b/src/fenrir/commands/onScreenUpdate/70000-incoming.py @@ -23,8 +23,8 @@ class command(): if not self.env['runtime']['screenManager'].isDelta(): return # this must be a keyecho or something - if len(self.env['screen']['newDelta']) <=2: - if abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) == 1: + 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 abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y']) == 1: diff --git a/src/fenrir/screenDriver/vcsaDriver.py b/src/fenrir/screenDriver/vcsaDriver.py index 9844c663..1d02e96d 100644 --- a/src/fenrir/screenDriver/vcsaDriver.py +++ b/src/fenrir/screenDriver/vcsaDriver.py @@ -165,7 +165,7 @@ class driver(): screenContent = dirtyContent if time.time() - timeout >= 0.4: break - time.sleep(0.0008) + time.sleep(0.007) vcsa[currScreen].seek(0) dirtyContent = vcsa[currScreen].read() eventQueue.put({"Type":fenrirEventType.ScreenUpdate,"Data":None})