Skip to content

Commit e94201f

Browse files
llpamiesbfredl
authored andcommitted
ui: convert byte strings in python3. Fixes #145
1 parent 6c0ec04 commit e94201f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

neovim/ui/cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
from .ui_bridge import UIBridge
77
from .. import attach
8+
from ..api import DecodeHook
9+
from ..compat import IS_PYTHON3
810

911

1012
@click.command(context_settings=dict(allow_extra_args=True))
@@ -58,6 +60,9 @@ def main(ctx, prog, notify, listen, connect, profile):
5860
nvim_argv = shlex.split(prog or 'nvim --embed') + ctx.args
5961
nvim = attach('child', argv=nvim_argv)
6062

63+
if IS_PYTHON3:
64+
nvim = nvim.with_hook(DecodeHook())
65+
6166
from .gtk_ui import GtkUI
6267
ui = GtkUI()
6368
bridge = UIBridge()

0 commit comments

Comments
 (0)