From 7928d9f44858493f49049f58788569361e9155f8 Mon Sep 17 00:00:00 2001 From: Blinov Evgeniy Date: Sat, 16 Mar 2024 15:04:19 +0300 Subject: [PATCH] Add g:NERDTreeFindResolveSymlinks for NERDTreeFind --- autoload/nerdtree/ui_glue.vim | 4 +++- plugin/NERD_tree.vim | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/nerdtree/ui_glue.vim b/autoload/nerdtree/ui_glue.vim index 1610d09..ea8a454 100644 --- a/autoload/nerdtree/ui_glue.vim +++ b/autoload/nerdtree/ui_glue.vim @@ -309,7 +309,9 @@ function! s:findAndRevealPath(pathStr) abort endif try - let l:pathStr = g:NERDTreePath.Resolve(l:pathStr) + if g:NERDTreeFindResolveSymlinks + let l:pathStr = g:NERDTreePath.Resolve(l:pathStr) + endif let l:pathObj = g:NERDTreePath.New(l:pathStr) catch /^NERDTree.InvalidArgumentsError/ call nerdtree#echoWarning('invalid path') diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 73085d0..51806e7 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -54,7 +54,7 @@ let g:NERDTreeShowHidden = get(g:, 'NERDTreeShowHidden', 0 let g:NERDTreeShowLineNumbers = get(g:, 'NERDTreeShowLineNumbers', 0) let g:NERDTreeSortDirs = get(g:, 'NERDTreeSortDirs', 1) let g:NERDTreeFileLines = get(g:, 'NERDTreeFileLines', 0) - +let g:NERDTreeFindResolveSymlinks = get(g:, 'NERDTreeFindResolveSymlinks', 1) if !nerdtree#runningWindows() && !nerdtree#runningCygwin() let g:NERDTreeDirArrowExpandable = get(g:, 'NERDTreeDirArrowExpandable', '▸')