Merge pull request #2164 from Freed-Wu/master

Fix bug of keyboard_layout
This commit is contained in:
Christian Brabandt 2020-06-29 09:24:48 +02:00 committed by GitHub
commit cb03578a7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ endif
function! airline#extensions#xkblayout#status() function! airline#extensions#xkblayout#status()
let keyboard_layout = libcall(g:XkbSwitchLib, 'Xkb_Switch_getXkbLayout', '') let keyboard_layout = libcall(g:XkbSwitchLib, 'Xkb_Switch_getXkbLayout', '')
let keyboard_layout = split(keyboard_layout, '\.')[-1] let keyboard_layout = get(split(keyboard_layout, '\.'), -1, '')
let short_codes = get(g:, 'airline#extensions#xkblayout#short_codes', {'2SetKorean': 'KR', 'Chinese': 'CN', 'Japanese': 'JP'}) let short_codes = get(g:, 'airline#extensions#xkblayout#short_codes', {'2SetKorean': 'KR', 'Chinese': 'CN', 'Japanese': 'JP'})
if has_key(short_codes, keyboard_layout) if has_key(short_codes, keyboard_layout)