[Maps] Display filename and line number (#998)

Fix #997

Co-authored-by: Ian Homer <ihomer@worth.systems>
This commit is contained in:
Ian Homer
2020-05-01 03:28:03 +01:00
committed by GitHub
parent f86ef1bce6
commit 4cf475b753

View File

@@ -1214,7 +1214,7 @@ function! fzf#vim#maps(mode, ...)
let curr = ''
for line in split(cout, "\n")
if line =~ "^\t"
let src = ' '.join(reverse(reverse(split(split(line)[-1], '/'))[0:2]), '/')
let src = "\t".substitute(matchstr(line, '/\zs[^/\\]*\ze$'), ' [^ ]* ', ':', '')
call add(list, printf('%s %s', curr, s:green(src, 'Comment')))
let curr = ''
else