Skip to content

Instantly share code, notes, and snippets.

@wolf-dog
Created February 27, 2015 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wolf-dog/6b2b6d1ecd1b2a3685cd to your computer and use it in GitHub Desktop.
Save wolf-dog/6b2b6d1ecd1b2a3685cd to your computer and use it in GitHub Desktop.
multibyte fix on vdebug
--- a/plugin/python/vdebug/ui/vimui.py
+++ b/plugin/python/vdebug/ui/vimui.py
@@ -284,9 +284,13 @@ class Window(vdebug.ui.interface.Window):
if return_focus:
prev_win = vim.eval('winnr()')
if self.buffer_empty():
- self.buffer[:] = str(msg).split('\n')
+ if isinstance(msg, unicode):
+ msg = msg.encode('utf-8')
+ self.buffer[:] = msg.split('\n')
else:
- self.buffer.append(str(msg).split('\n'))
+ if isinstance(msg, unicode):
+ msg = msg.encode('utf-8')
+ self.buffer.append(msg.split('\n'))
self.command(after)
if return_focus:
vim.command('%swincmd W' % prev_win)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment