diff options
author | Florent Le Coz <louiz@louiz.org> | 2012-10-09 05:05:06 +0000 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2012-10-09 05:05:06 +0000 |
commit | c9a244ceb02ae0fe6710ddb08f573deb6b0bbd3b (patch) | |
tree | 99496076ab1a717690fc9f8ed3cc6d1083b2c8bd | |
parent | 653695498aa334f3c34b0946162020fbae10839d (diff) | |
download | poezio-c9a244ceb02ae0fe6710ddb08f573deb6b0bbd3b.tar.gz poezio-c9a244ceb02ae0fe6710ddb08f573deb6b0bbd3b.tar.bz2 poezio-c9a244ceb02ae0fe6710ddb08f573deb6b0bbd3b.tar.xz poezio-c9a244ceb02ae0fe6710ddb08f573deb6b0bbd3b.zip |
Refresh less often when entering text.
-rw-r--r-- | src/core.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/core.py b/src/core.py index 700e6815..4e7cb297 100644 --- a/src/core.py +++ b/src/core.py @@ -355,9 +355,7 @@ class Core(object): main loop waiting for the user to press a key """ def sanitize_input(key): - if key == '^J': - return '\n' - elif key == '^I': + if key == '^I': return ' ' return key def replace_line_breaks(key): @@ -398,7 +396,6 @@ class Core(object): log.debug(big_char_list) log.debug(separate_chars_from_bindings(big_char_list)) # whether to refresh after ALL keys have been handled - do_refresh = True for char_list in separate_chars_from_bindings(big_char_list): if self.paused: self.current_tab().input.do_command(char_list[0]) @@ -423,16 +420,11 @@ class Core(object): func() else: res = self.do_command(replace_line_breaks(char), False) - if res: - do_refresh = True else: self.do_command(''.join(map( lambda x: sanitize_input(x), char_list) ), True) - refresh = True - if refresh == True: - self.refresh_window() self.doupdate() def save_config(self): |