commit d89dbd354aafd09a743e927dc9655821947e38fd
parent ed273e108db61dab64d7c1a703796ce273f60b2a
Author: Martin Grenfell <martin_grenfell@msn.com>
Date: Wed, 1 Oct 2008 22:32:03 +1300
dont clobber &cpo
Diffstat:
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt
@@ -899,6 +899,9 @@ fridge for later ;)
==============================================================================
7. Changelog *NERDTreeChangelog*
+2.xx.xx
+ - dont clobber &cpo. Thanks to godlygeek for the bug report.
+
2.14.0
- fix a bug where the <c-w>o mapping would cause the tree window to be
incorrectly sized when reopened.
@@ -1220,6 +1223,8 @@ NERDTreeQuitOnOpen was set.
Thanks to Charlton Wang for reporting bugs with the 'o' mapping and with
handling named pipes.
+Chur to godlygeek for reporting a bug where &cpo was getting clobbered.
+
==============================================================================
9. License *NERDTreeLicense*
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -22,6 +22,11 @@ if v:version < 700
finish
endif
let loaded_nerd_tree = 1
+
+"for line continuation - i.e dont want C in &cpo
+let s:old_cpo = &cpo
+set cpo&vim
+
"Function: s:initVariable() function {{{2
"This function is used to initialise a given variable to a given value. The
"variable is only initialised if it does not exist prior
@@ -1828,9 +1833,6 @@ function! s:createTreeWin()
endif
- " for line continuation
- let cpo_save1 = &cpo
- set cpo&vim
call s:bindMappings()
setfiletype nerdtree
@@ -3527,4 +3529,8 @@ function! s:upDir(keepState)
endif
endfunction
+
+"reset &cpo back to users setting
+let &cpo = s:old_cpo
+
" vim: set sw=4 sts=4 et fdm=marker: