Merge pull request #940 from chrisbra/nrrwrgn

NrrwRgn: Only use Utf-8 Glyph in utf8 encoding
This commit is contained in:
Christian Brabandt 2016-01-23 21:35:28 +01:00
commit cce3e41398
1 changed files with 2 additions and 1 deletions

View File

@ -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)