Skip to content

Commit d69b68b

Browse files
authored
Fix documentation error (#1372)
1 parent 3a66272 commit d69b68b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTa
170170
171171
```vim
172172
" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree.
173-
autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
173+
autocmd BufEnter * if winnr() == winnr('h') && bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
174174
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
175175
```
176176

0 commit comments

Comments
 (0)