diff --git a/test/vim_interface.py b/test/vim_interface.py index cecc270..c885589 100644 --- a/test/vim_interface.py +++ b/test/vim_interface.py @@ -172,9 +172,10 @@ class VimInterfaceTmux(VimInterface): # to tmux, but it seems like this is all that is needed for now. s = s.replace(';', r'\;') - if PYTHON3: - s = s.encode('utf-8') - silent_call(['tmux', 'send-keys', '-t', self.session, '-l', s]) + if len(s) == 1: + silent_call(['tmux', 'send-keys', '-t', self.session, hex(ord(s))]) + else: + silent_call(['tmux', 'send-keys', '-t', self.session, '-l', s]) def send_to_terminal(self, s): return self._send(s) diff --git a/test/vim_test_case.py b/test/vim_test_case.py index f3a6e08..b689bbb 100644 --- a/test/vim_test_case.py +++ b/test/vim_test_case.py @@ -185,7 +185,7 @@ class VimTestCase(unittest.TestCase, TempFileManager): if not self.interrupt: # Go into insert mode and type the keys but leave Vim some time to # react. - text = 'i' + self.keys + text = u'i' + self.keys.decode("utf-8") while text: to_send = None for seq in SEQUENCES: