File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -72,11 +72,54 @@ function! asyncrun#locator#nofile_buffer_path() abort
72
72
if t != ' ' && isdirectory (t )
73
73
return t
74
74
endif
75
+ elseif &ft == ' tagbar'
76
+ if bufname (' %' ) = ~ ' \v^__TagBar__\.'
77
+ if exists (' t:tagbar_state' )
78
+ try
79
+ let t = t :tagbar_state._current.fpath
80
+ return t
81
+ catch
82
+ endtry
83
+ endif
84
+ endif
85
+ elseif &ft == ' vista' || &ft = ~ ' \v^vista_'
86
+ try
87
+ let t = g: vista .source .fname
88
+ return fnamemodify (t , ' :p' )
89
+ catch
90
+ endtry
91
+ elseif &ft == ' aerial'
92
+ if exists (' b:source_buffer' )
93
+ let name = bufname (b: source_buffer )
94
+ return name
95
+ endif
96
+ elseif &ft == ' Outline'
97
+ try
98
+ let t = luaeval (" require('outline').current.code.buf" )
99
+ return bufname (t )
100
+ catch
101
+ try
102
+ let wid = luaeval (" require('symbols-outline').state.code_win" )
103
+ let bid = winbufnr (wid)
104
+ return bufname (bid)
105
+ catch
106
+ endtry
107
+ endtry
75
108
endif
76
109
if exists (' b:git_dir' )
77
110
return b: git_dir
78
111
endif
79
112
endif
113
+ if &ft == ' oil' && &bt != ' '
114
+ let name = bufname (' %' )
115
+ if name = ~ ' \v^oil\:[\\\/][\\\/]'
116
+ let t = strpart (name, s: windows ? 7 : 6 )
117
+ if s: windows && t = ~ ' \v^\w[\\\/]'
118
+ let t = strpart (t , 0 , 1 ) . ' :' . strpart (t , 1 )
119
+ endif
120
+ return t
121
+ endif
122
+ endif
80
123
return ' '
81
124
endfunc
82
125
You can’t perform that action at this time.
0 commit comments