From 9d3953e98cfc7457f74ba6b85e6955330b7bafa7 Mon Sep 17 00:00:00 2001 From: chrys Date: Sat, 11 Nov 2017 23:30:34 +0100 Subject: [PATCH] split out tab completion from char echo --- src/fenrir/commands/onCursorChange/45000-char_echo.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/fenrir/commands/onCursorChange/45000-char_echo.py b/src/fenrir/commands/onCursorChange/45000-char_echo.py index f52c2c3a..9647a0fd 100644 --- a/src/fenrir/commands/onCursorChange/45000-char_echo.py +++ b/src/fenrir/commands/onCursorChange/45000-char_echo.py @@ -17,6 +17,10 @@ class command(): return 'No Description found' def run(self): + # 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: + return if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'): return # detect deletion or chilling @@ -25,10 +29,7 @@ class command(): # is there any change? 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'])): - return + # filter unneded space on word begin currDelta = self.env['screen']['newDelta'] if len(currDelta.strip()) != len(currDelta) and \