Fix the ^I (when pasting) issue correctly this time.
This commit is contained in:
parent
f525bcc1f0
commit
3879a91112
1 changed files with 5 additions and 1 deletions
|
@ -1101,6 +1101,10 @@ class Core(object):
|
||||||
if key == '^J':
|
if key == '^J':
|
||||||
return '\n'
|
return '\n'
|
||||||
return key
|
return key
|
||||||
|
def replace_tabulation(key):
|
||||||
|
if key == '^I':
|
||||||
|
return ' '
|
||||||
|
return key
|
||||||
while self.running:
|
while self.running:
|
||||||
if self.paused: continue
|
if self.paused: continue
|
||||||
char_list = [common.replace_key_with_bound(key)\
|
char_list = [common.replace_key_with_bound(key)\
|
||||||
|
@ -1131,7 +1135,7 @@ class Core(object):
|
||||||
if res:
|
if res:
|
||||||
self.refresh_window()
|
self.refresh_window()
|
||||||
else:
|
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.refresh_window()
|
||||||
self.doupdate()
|
self.doupdate()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue