From d69b68bf31fcbd9cb34c275dbc58a79c40dedeae Mon Sep 17 00:00:00 2001 From: Bubu <50858626+BubuDavid@users.noreply.github.com> Date: Thu, 19 Oct 2023 05:48:25 -0600 Subject: [PATCH] Fix documentation error (#1372) --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 2f97d07..eaf401a 100644 --- a/README.markdown +++ b/README.markdown @@ -170,7 +170,7 @@ autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTa ```vim " If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree. -autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 | +autocmd BufEnter * if winnr() == winnr('h') && bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 | \ let buf=bufnr() | buffer# | execute "normal! \w" | execute 'buffer'.buf | endif ```