dont clobber &cpo

This commit is contained in:
Martin Grenfell 2008-10-01 22:32:03 +13:00
parent ed273e108d
commit d89dbd354a
2 changed files with 14 additions and 3 deletions

View File

@ -899,6 +899,9 @@ fridge for later ;)
============================================================================== ==============================================================================
7. Changelog *NERDTreeChangelog* 7. Changelog *NERDTreeChangelog*
2.xx.xx
- dont clobber &cpo. Thanks to godlygeek for the bug report.
2.14.0 2.14.0
- fix a bug where the <c-w>o mapping would cause the tree window to be - fix a bug where the <c-w>o mapping would cause the tree window to be
incorrectly sized when reopened. incorrectly sized when reopened.
@ -1220,6 +1223,8 @@ NERDTreeQuitOnOpen was set.
Thanks to Charlton Wang for reporting bugs with the 'o' mapping and with Thanks to Charlton Wang for reporting bugs with the 'o' mapping and with
handling named pipes. handling named pipes.
Chur to godlygeek for reporting a bug where &cpo was getting clobbered.
============================================================================== ==============================================================================
9. License *NERDTreeLicense* 9. License *NERDTreeLicense*

View File

@ -22,6 +22,11 @@ if v:version < 700
finish finish
endif endif
let loaded_nerd_tree = 1 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 "Function: s:initVariable() function {{{2
"This function is used to initialise a given variable to a given value. The "This function is used to initialise a given variable to a given value. The
"variable is only initialised if it does not exist prior "variable is only initialised if it does not exist prior
@ -1828,9 +1833,6 @@ function! s:createTreeWin()
endif endif
" for line continuation
let cpo_save1 = &cpo
set cpo&vim
call s:bindMappings() call s:bindMappings()
setfiletype nerdtree setfiletype nerdtree
@ -3527,4 +3529,8 @@ function! s:upDir(keepState)
endif endif
endfunction endfunction
"reset &cpo back to users setting
let &cpo = s:old_cpo
" vim: set sw=4 sts=4 et fdm=marker: " vim: set sw=4 sts=4 et fdm=marker: