summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2012-05-20 13:54:38 +0200
committerFlorent Le Coz <louiz@louiz.org>2012-05-20 13:54:38 +0200
commit837b46d68b10f5c6e9cc80e07e33fd025b51634b (patch)
treee5670a21cd2bb8de4250317725e5b8e40efaff97
parent65c2d3dc8891eae4307375eef4b79d13ac793e46 (diff)
downloadpoezio-837b46d68b10f5c6e9cc80e07e33fd025b51634b.tar.gz
poezio-837b46d68b10f5c6e9cc80e07e33fd025b51634b.tar.bz2
poezio-837b46d68b10f5c6e9cc80e07e33fd025b51634b.tar.xz
poezio-837b46d68b10f5c6e9cc80e07e33fd025b51634b.zip
Do not display ^I when pasting a tabulation char.
-rw-r--r--src/core.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core.py b/src/core.py
index 3ac0a0b5..4cf0a7d4 100644
--- a/src/core.py
+++ b/src/core.py
@@ -1072,9 +1072,11 @@ class Core(object):
"""
main loop waiting for the user to press a key
"""
- def replace_line_breaks(key):
+ def replace_special_keys(key):
if key == '^J':
return '\n'
+ elif key == '^I':
+ return ' '
return key
while self.running:
if self.paused: continue
@@ -1102,11 +1104,11 @@ class Core(object):
if func:
func()
else:
- res = self.do_command(replace_line_breaks(char), False)
+ res = self.do_command(replace_special_keys(char), False)
if res:
self.refresh_window()
else:
- self.do_command(''.join(list(map(replace_line_breaks, char_list))), True)
+ self.do_command(''.join(list(map(replace_special_keys char_list))), True)
self.refresh_window()
self.doupdate()