aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION4
-rw-r--r--vim/after/ftplugin/text.vim5
-rw-r--r--vim/ftplugin/text.vim13
3 files changed, 10 insertions, 12 deletions
diff --git a/VERSION b/VERSION
index 6b9b13a5..a8c12061 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v4.23.0
-Fri May 10 23:22:34 UTC 2019
+tejr dotfiles v4.24.0
+Fri May 10 23:35:38 UTC 2019
diff --git a/vim/after/ftplugin/text.vim b/vim/after/ftplugin/text.vim
deleted file mode 100644
index cda2891c..00000000
--- a/vim/after/ftplugin/text.vim
+++ /dev/null
@@ -1,5 +0,0 @@
-" Spellcheck documents we're actually editing (not just viewing)
-if has('spell') && &modifiable && !&readonly
- setlocal spell
- let b:undo_ftplugin .= '|setlocal spell<'
-endif
diff --git a/vim/ftplugin/text.vim b/vim/ftplugin/text.vim
index a5dc810f..362dfb69 100644
--- a/vim/ftplugin/text.vim
+++ b/vim/ftplugin/text.vim
@@ -1,8 +1,5 @@
-" The 'text' filetype was only added in v7.4.365, so anything older than this
-" requires our own filetype plugin to prevent the b:undo_ftplugin extensions
-" in after/ftplugin/text.vim from panicking.
-if v:version > 704
- \ || v:version == 703 && has('patch365')
+" Only do this when not yet done for this buffer
+if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
@@ -12,3 +9,9 @@ setlocal comments+=fb:- " Dashed lists
setlocal comments+=fb:* " Bulleted lists
setlocal comments+=n:> " Mail quotes
let b:undo_ftplugin = 'setlocal comments<'
+
+" Spellcheck documents we're actually editing (not just viewing)
+if has('spell') && &modifiable && !&readonly
+ setlocal spell
+ let b:undo_ftplugin .= '|setlocal spell<'
+endif