Fix ambiwidth=double again and make sure it doesn't break again

This commit is contained in:
Ben Jackson 2020-09-25 16:28:54 +01:00
commit b34ccd679d
4 changed files with 735 additions and 1 deletions

View file

@ -12,7 +12,10 @@ def SignDefined( name ):
return False
def DefineSign( name, text, texthl, col = 'right', **kwargs ):
def DefineSign( name, text, double_text, texthl, col = 'right', **kwargs ):
if utils.GetVimValue( vim.options, 'ambiwidth', '' ) == 'double':
text = double_text
if col == 'right':
if int( utils.Call( 'strdisplaywidth', text ) ) < 2:
text = ' ' + text