[Maps] Fix parse error in non-US locales
Close #324 Caveat: The fix assumes that the paths of Vimscript files do not contain whitespaces. Maps will report incorrect paths if they do.
This commit is contained in:
parent
f3c3646c81
commit
8ffd3fb0ba
1 changed files with 4 additions and 5 deletions
|
@ -1094,13 +1094,12 @@ function! fzf#vim#maps(mode, ...)
|
|||
let list = []
|
||||
let curr = ''
|
||||
for line in split(cout, "\n")
|
||||
let src = matchstr(line, 'Last set from \zs.*')
|
||||
if empty(src)
|
||||
let curr = line[3:]
|
||||
else
|
||||
let src = ' '.join(reverse(reverse(split(src, '/'))[0:2]), '/')
|
||||
if line =~ "^\t"
|
||||
let src = ' '.join(reverse(reverse(split(split(line)[-1], '/'))[0:2]), '/')
|
||||
call add(list, printf('%s %s', curr, s:green(src, 'Comment')))
|
||||
let curr = ''
|
||||
else
|
||||
let curr = line[3:]
|
||||
endif
|
||||
endfor
|
||||
if !empty(curr)
|
||||
|
|
Loading…
Add table
Reference in a new issue