summaryrefslogtreecommitdiff
path: root/.config/nvim/plugins/nerdtree.vim
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-02-28 17:52:23 +0100
committerDaniel Weipert <code@drogueronin.de>2023-10-30 09:52:23 +0100
commitb917ecb7d95a31b72d82cb9a339cfa1f76eea5ab (patch)
tree836b6938fec2612c4511b7473054247df031da9c /.config/nvim/plugins/nerdtree.vim
parentb13bb4e2d1f883ba7f84bfaa55ad36ef7110c998 (diff)
[nvim] run nerdtree tab switch for relevant file types only
Diffstat (limited to '.config/nvim/plugins/nerdtree.vim')
-rw-r--r--.config/nvim/plugins/nerdtree.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/.config/nvim/plugins/nerdtree.vim b/.config/nvim/plugins/nerdtree.vim
index 57ffba2..3a8ad50 100644
--- a/.config/nvim/plugins/nerdtree.vim
+++ b/.config/nvim/plugins/nerdtree.vim
@@ -29,6 +29,11 @@ autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTa
" set status line on tab switch
function NERDTreeStatusLineTabSwitch()
+ " only when in non-meaningful window
+ if index(g:NERDTreeStatusLineTabSwitchFiletypes, &filetype) == -1
+ return
+ endif
+
let tab_nr = tabpagenr()
let buffer_list = tabpagebuflist(tab_nr)