Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit44a5e8a

Browse files
author
skywind3000
committed
Refactor buffer path retrieval in asyncrun locator plugin
1 parentf282cf1 commit44a5e8a

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

‎autoload/asyncrun/locator.vim‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,54 @@ function! asyncrun#locator#nofile_buffer_path() abort
7272
ift!=''&&isdirectory(t)
7373
returnt
7474
endif
75+
elseif &ft=='tagbar'
76+
ifbufname('%')=~'\v^__TagBar__\.'
77+
ifexists('t:tagbar_state')
78+
try
79+
lett=t:tagbar_state._current.fpath
80+
returnt
81+
catch
82+
endtry
83+
endif
84+
endif
85+
elseif &ft=='vista'|| &ft=~'\v^vista_'
86+
try
87+
lett=g:vista.source.fname
88+
returnfnamemodify(t,':p')
89+
catch
90+
endtry
91+
elseif &ft=='aerial'
92+
ifexists('b:source_buffer')
93+
let name=bufname(b:source_buffer)
94+
return name
95+
endif
96+
elseif &ft=='Outline'
97+
try
98+
lett=luaeval("require('outline').current.code.buf")
99+
returnbufname(t)
100+
catch
101+
try
102+
let wid=luaeval("require('symbols-outline').state.code_win")
103+
let bid=winbufnr(wid)
104+
returnbufname(bid)
105+
catch
106+
endtry
107+
endtry
75108
endif
76109
ifexists('b:git_dir')
77110
returnb:git_dir
78111
endif
79112
endif
113+
if &ft=='oil'&& &bt!=''
114+
let name=bufname('%')
115+
if name=~'\v^oil\:[\\\/][\\\/]'
116+
lett=strpart(name,s:windows?7 :6)
117+
ifs:windows&&t=~'\v^\w[\\\/]'
118+
lett=strpart(t,0,1) .':' .strpart(t,1)
119+
endif
120+
returnt
121+
endif
122+
endif
80123
return''
81124
endfunc
82125

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp