Adapt to the new way that tmux wants unicode be send.
This fixes most unicode using test-cases.
This commit is contained in:
parent
2470a1b380
commit
3515cb6c13
@ -172,9 +172,10 @@ class VimInterfaceTmux(VimInterface):
|
|||||||
# to tmux, but it seems like this is all that is needed for now.
|
# to tmux, but it seems like this is all that is needed for now.
|
||||||
s = s.replace(';', r'\;')
|
s = s.replace(';', r'\;')
|
||||||
|
|
||||||
if PYTHON3:
|
if len(s) == 1:
|
||||||
s = s.encode('utf-8')
|
silent_call(['tmux', 'send-keys', '-t', self.session, hex(ord(s))])
|
||||||
silent_call(['tmux', 'send-keys', '-t', self.session, '-l', s])
|
else:
|
||||||
|
silent_call(['tmux', 'send-keys', '-t', self.session, '-l', s])
|
||||||
|
|
||||||
def send_to_terminal(self, s):
|
def send_to_terminal(self, s):
|
||||||
return self._send(s)
|
return self._send(s)
|
||||||
|
@ -185,7 +185,7 @@ class VimTestCase(unittest.TestCase, TempFileManager):
|
|||||||
if not self.interrupt:
|
if not self.interrupt:
|
||||||
# Go into insert mode and type the keys but leave Vim some time to
|
# Go into insert mode and type the keys but leave Vim some time to
|
||||||
# react.
|
# react.
|
||||||
text = 'i' + self.keys
|
text = u'i' + self.keys.decode("utf-8")
|
||||||
while text:
|
while text:
|
||||||
to_send = None
|
to_send = None
|
||||||
for seq in SEQUENCES:
|
for seq in SEQUENCES:
|
||||||
|
Loading…
Reference in New Issue
Block a user