summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2012-05-21 13:24:02 +0200
committerFlorent Le Coz <louiz@louiz.org>2012-05-21 13:28:38 +0200
commit3879a91112722a2a26e0785d402c47b9df8104cb (patch)
tree020d8bd8d5df99b3423c64b813d09f72c1e86604
parentf525bcc1f090d7b1c57f449c04d4aa7fafcb8dd2 (diff)
downloadpoezio-3879a91112722a2a26e0785d402c47b9df8104cb.tar.gz
poezio-3879a91112722a2a26e0785d402c47b9df8104cb.tar.bz2
poezio-3879a91112722a2a26e0785d402c47b9df8104cb.tar.xz
poezio-3879a91112722a2a26e0785d402c47b9df8104cb.zip
Fix the ^I (when pasting) issue correctly this time.
-rw-r--r--src/core.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core.py b/src/core.py
index 9302b464..7719d44f 100644
--- a/src/core.py
+++ b/src/core.py
@@ -1101,6 +1101,10 @@ class Core(object):
if key == '^J':
return '\n'
return key
+ def replace_tabulation(key):
+ if key == '^I':
+ return ' '
+ return key
while self.running:
if self.paused: continue
char_list = [common.replace_key_with_bound(key)\
@@ -1131,7 +1135,7 @@ class Core(object):
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_line_breaks, list(map(replace_tabulation, char_list))))), True)
self.refresh_window()
self.doupdate()