Merge pull request #69 from kyouryuukunn/develop

Fixed a problem about the vim translated to Japanese
This commit is contained in:
Idan Arye 2018-09-25 02:05:54 +03:00 committed by GitHub
commit 2f88c8db15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,9 +132,20 @@ function! vebugger#util#listify(stringOrList)
endif
endfunction
" Return the resul of a:command in English, even if language messages set
" others.
function! vebugger#util#EnglishExecute(command) abort
let l:lang = matchstr(execute('language messages'), '"\zs.*\ze"')
if l:lang !~ 'en' | language messages en_US.utf8 | endif
let l:result = execute(a:command)
if l:lang !~ 'en' | language messages l:lang | endif
return l:result
endfunction
function! s:listSigns(filter) abort
let l:result = []
for l:line in split(execute('sign place '.a:filter), '\n')
for l:line in split(vebugger#util#EnglishExecute('sign place '.a:filter), '\n')
let l:match = matchlist(l:line, '\C\v^\s+line\=(\d+)\s+id\=(\d+)\s+name\=(.+)$')
if !empty(l:match)
call add(l:result, {