From 63bd097393e1c49528d0be3d798f7248b5497ccd Mon Sep 17 00:00:00 2001 From: Yannick Brehon Date: Wed, 16 Dec 2015 15:36:00 -0500 Subject: [PATCH] Fixed spacing issue with box and bbox. When commentstring had a trailing space, such as '# %s', the rendered box was incorrect. --- pythonx/vimsnippets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonx/vimsnippets.py b/pythonx/vimsnippets.py index d200229..6a446a2 100644 --- a/pythonx/vimsnippets.py +++ b/pythonx/vimsnippets.py @@ -78,7 +78,7 @@ def get_comment_format(): def make_box(twidth, bwidth=None): - b, m, e, i = get_comment_format() + b, m, e, i = (s.strip() for s in get_comment_format()) bwidth_inner = bwidth - 3 - max(len(b), len(i + e)) if bwidth else twidth + 2 sline = b + m + bwidth_inner * m[0] + 2 * m[0] nspaces = (bwidth_inner - twidth) // 2