File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11
11
" ----------------------------------------------------------------------
12
12
" guess current buffer's directory
13
13
" ----------------------------------------------------------------------
14
- function ! asyncrun#locator#buffer_path ()
14
+ function ! asyncrun#locator#nofile_buffer_path ()
15
15
if &bt == ' '
16
16
return ' '
17
17
elseif &bt == ' nofile'
@@ -29,6 +29,12 @@ function! asyncrun#locator#buffer_path()
29
29
if exists (' b:magit_top_dir' )
30
30
return b: magit_top_dir
31
31
endif
32
+ elseif &ft == ' NeogitStatus' && has (' nvim' )
33
+ try
34
+ let t = luaeval (' require("neogit.lib.git").repo.git_root' )
35
+ return t
36
+ catch
37
+ endtry
32
38
endif
33
39
if exists (' b:git_dir' )
34
40
return b: git_dir
@@ -45,7 +51,7 @@ function! asyncrun#locator#detect()
45
51
if &bt == ' '
46
52
return ' '
47
53
endif
48
- let path = asyncrun#locator#buffer_path ()
54
+ let path = asyncrun#locator#nofile_buffer_path ()
49
55
if path != ' ' && (isdirectory (path ) || filereadable (path ))
50
56
return asyncrun#get_root (path )
51
57
endif
You can’t perform that action at this time.
0 commit comments