Skip to content

Commit

Permalink
Use s:current_file() in s:activate()
Browse files Browse the repository at this point in the history
  • Loading branch information
airblade committed Apr 23, 2024
1 parent f3b4aba commit 45e53f0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugin/rooter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ function! s:activate()
if index(g:rooter_buftypes, &buftype) == -1 | return 0 | endif

let patterns = split(g:rooter_targets, ',')
let fn = expand('%:p', 1)

if fn =~ 'NERD_tree_\d\+$' | let fn = b:NERDTree.root.path.str().'/' | endif
let fn = s:current_file()

" directory
if empty(fn) || isdirectory(fn)
Expand Down

0 comments on commit 45e53f0

Please sign in to comment.