r923 - /trunk/runtime/ftplugin/debchangelog.vim

jamessan at users.alioth.debian.org jamessan at users.alioth.debian.org
Tue Apr 10 12:54:48 UTC 2007


Author: jamessan
Date: Tue Apr 10 12:54:47 2007
New Revision: 923

URL: http://svn.debian.org/wsvn/?sc=1&rev=923
Log:
Call foldopen silently so we don't error when there are no folds (#416184)
Check for existence of g:debchangelog_fold_disabled so users can disable automatic folding of debchangelogs.

Modified:
    trunk/runtime/ftplugin/debchangelog.vim

Modified: trunk/runtime/ftplugin/debchangelog.vim
URL: http://svn.debian.org/wsvn/trunk/runtime/ftplugin/debchangelog.vim?rev=923&op=diff
==============================================================================
--- trunk/runtime/ftplugin/debchangelog.vim (original)
+++ trunk/runtime/ftplugin/debchangelog.vim Tue Apr 10 12:54:47 2007
@@ -12,14 +12,16 @@
 let b:did_ftplugin=1
 
 " {{{1 Local settings (do on every load)
-setlocal foldmethod=expr
+if !exists("g:debchangelog_fold_disable")
+  setlocal foldmethod=expr
+endif
 setlocal foldexpr=GetDebChangelogFold(v:lnum)
 setlocal foldtext=DebChangelogFoldText()
 
 " Debian changelogs are not supposed to have any other text width,
 " so the user cannot override this setting
 setlocal tw=78
-setlocal comments=f:* 
+setlocal comments=f:*
 
 " Clean unloading
 let b:undo_ftplugin = "setlocal tw< comments< foldmethod< foldexpr< foldtext<"
@@ -261,7 +263,7 @@
   return '='
 endfunction
 
-foldopen!   " unfold the entry the cursor is on (usually the first one)
+silent! foldopen!   " unfold the entry the cursor is on (usually the first one)
 
 " }}}
 




More information about the pkg-vim-maintainers mailing list