summaryrefslogtreecommitdiffstats
path: root/ftplugin/eruby.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/eruby.vim')
-rw-r--r--ftplugin/eruby.vim10
1 files changed, 7 insertions, 3 deletions
diff --git a/ftplugin/eruby.vim b/ftplugin/eruby.vim
index 7ea19dea..33c769dd 100644
--- a/ftplugin/eruby.vim
+++ b/ftplugin/eruby.vim
@@ -89,8 +89,12 @@ runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim
let b:did_ftplugin = 1
" Combine the new set of values with those previously included.
-if exists("b:undo_ftplugin")
- let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
+if !exists('b:undo_ftplugin')
+ " No-op
+ let b:undo_ftplugin = 'exe'
+endif
+if !empty(s:undo_ftplugin)
+ let b:undo_ftplugin .= '|' . s:undo_ftplugin
endif
if exists ("b:browsefilter")
let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter
@@ -122,7 +126,7 @@ endif
setlocal commentstring=<%#%s%>
let b:undo_ftplugin = "setl cms< " .
- \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
+ \ " | unlet! b:browsefilter b:match_words | " . b:undo_ftplugin
let &cpo = s:save_cpo
unlet s:save_cpo