From e42c0b0f33d0ed9e98a8ced4f4a011816747dd36 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sat, 23 Jan 2016 21:31:34 +0100 Subject: [PATCH] NrrwRgn: Only use Utf-8 Glyph in utf8 encoding Fixes #567 --- autoload/airline/extensions/nrrwrgn.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/nrrwrgn.vim b/autoload/airline/extensions/nrrwrgn.vim index c0ea42e..78a1daa 100644 --- a/autoload/airline/extensions/nrrwrgn.vim +++ b/autoload/airline/extensions/nrrwrgn.vim @@ -39,7 +39,8 @@ function! airline#extensions#nrrwrgn#apply(...) endif endif let range=(dict.multi ? '' : printf("[%d-%d]", dict.start[1], dict.end[1])) - call a:1.add_section('airline_c', printf("%s %s %s", name, range, dict.enabled ? "\u2713" : '!')) + call a:1.add_section('airline_c', printf("%s %s %s", name, range, + \ dict.enabled ? (&encoding ==? 'utf-8' ? "\u2713" : '') : '!')) call a:1.split() call a:1.add_section('airline_x', get(g:, 'airline_section_x').spc) call a:1.add_section('airline_y', spc.get(g:, 'airline_section_y').spc)