Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #85 from khalilgharbaoui/master
Browse files Browse the repository at this point in the history
Fix g:nerdtree_tabs_autofind=1 not working! #63
  • Loading branch information
jistr committed Feb 12, 2017
2 parents 72a14f5 + ddfec72 commit caa95ce
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions nerdtree_plugin/vim-nerdtree-tabs.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if !exists('g:nerdtree_tabs_open_on_gui_startup')
let g:nerdtree_tabs_open_on_gui_startup = 1
endif

" Open NERDTree on console vim startup (off by default). When set to `2`,
" Open NERDTree on console vim startup (off by default). When set to `2`,
" open only if directory was given as startup argument.
if !exists('g:nerdtree_tabs_open_on_console_startup')
let g:nerdtree_tabs_open_on_console_startup = 0
Expand Down Expand Up @@ -470,8 +470,8 @@ fun! s:VimEnterHandler()
let l:open_nerd_tree_on_startup = (g:nerdtree_tabs_open_on_console_startup == 1 && !has('gui_running')) ||
\ (g:nerdtree_tabs_open_on_gui_startup == 1 && has('gui_running'))

let l:open_directory_on_startup = isdirectory(argv(0)) &&
\ ((g:nerdtree_tabs_open_on_console_startup == 2 && !has('gui_running')) ||
let l:open_directory_on_startup = isdirectory(argv(0)) &&
\ ((g:nerdtree_tabs_open_on_console_startup == 2 && !has('gui_running')) ||
\ (g:nerdtree_tabs_open_on_gui_startup == 2 && has('gui_running')))

if g:nerdtree_tabs_no_startup_for_diff && &diff
Expand Down Expand Up @@ -511,6 +511,10 @@ fun! s:VimEnterHandler()
NERDTreeFocus
endif
endif
if g:nerdtree_tabs_autofind
call s:NERDTreeFindFile()
call s:NERDTreeUnfocus()
endif
endif
endfun

Expand Down

0 comments on commit caa95ce

Please sign in to comment.