From 8164fa09d3ef5c092ed99ec63c8332df0fb71e1b Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Fri, 23 Jan 2009 23:43:47 +1300 Subject: [PATCH] fix a bug with the Path#strForEditCmd() and relative paths --- plugin/NERD_tree.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 96f6be8..f4538be 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -1903,9 +1903,11 @@ function! s:Path.strForEditCmd() let cwd = tolower(getcwd()) endif + let cwd = cwd . s:os_slash + "return a relative path if we can if stridx(p, cwd) == 0 - let p = strpart(p, strlen(cwd)+1) + let p = strpart(p, strlen(cwd)) endif if p == ''