From 9837c1e7c8f6c7ed019df9b9517d5bacbfeb20c9 Mon Sep 17 00:00:00 2001 From: "D.E. Akers" <0x0dea@gmail.com> Date: Tue, 9 Jun 2015 10:04:10 -0400 Subject: [PATCH] Simplify crypt indicator generation nr2char() is a much simpler way to obtain UTF-8 codepoints beyond 0xFFFF. --- autoload/airline/init.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autoload/airline/init.vim b/autoload/airline/init.vim index a5f84f65..992fa880 100644 --- a/autoload/airline/init.vim +++ b/autoload/airline/init.vim @@ -55,9 +55,6 @@ function! airline#init#bootstrap() \ }, 'keep') call s:check_defined('g:airline_symbols', {}) - let s:airline_crypt='' - " generate crypt symbol, "\u" only accepts up to 4 chars - exe 'sil norm!' ":\U1F512\eextend(s:, {'airline_crypt': getcmdline()}).airline_crypt\n" call extend(g:airline_symbols, { \ 'paste': get(g:, 'airline_paste_symbol', 'PASTE'), \ 'readonly': get(g:, 'airline_readonly_symbol', get(g:, 'airline_powerline_fonts', 0) ? "\ue0a2" : 'RO'), @@ -66,9 +63,8 @@ function! airline#init#bootstrap() \ 'branch': get(g:, 'airline_branch_prefix', get(g:, 'airline_powerline_fonts', 0) ? "\ue0a0" : ''), \ 'modified': '+', \ 'space': ' ', - \ 'crypt': get(g:, 'airline_crypt_symbol', s:airline_crypt), + \ 'crypt': get(g:, 'airline_crypt_symbol', nr2char(0x1F512, 1)), \ }, 'keep') - unlet! s:airline_crypt call airline#parts#define('mode', { \ 'function': 'airline#parts#mode',