Skip to content

Commit c572812

Browse files
author
skywind3000
committed
Add support for fetching file path in fern file browser for asyncrun plugin
1 parent 915e36a commit c572812

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

autoload/asyncrun/locator.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ function! asyncrun#locator#nofile_buffer_path() abort
119119
catch
120120
endtry
121121
endif
122+
elseif &ft == 'fern'
123+
let t = bufname('%')
124+
if t =~ '\v^fern\:\/\/\w+\/file\:\/\/'
125+
let t = matchstr(t, '\v^fern\:\/\/\w+\/file\:\/\/\zs.*\ze\$')
126+
if t != ''
127+
return (s:windows)? strpart(t, 1) : t
128+
endif
129+
endif
122130
endif
123131
if exists('b:git_dir')
124132
return b:git_dir

0 commit comments

Comments
 (0)