aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2023-04-06 16:00:00 +1200
committerTom Ryder <tom@sanctum.geek.nz>2023-04-06 16:00:00 +1200
commit6199ee785c6fb964292ec6e82c5b8a0f79e26069 (patch)
treeacb4e2286730b3dab720467b9c1f95cc500d86fc /plugin
parentMerge branch 'hotfix/v1.1.1' (diff)
parentAdjust logic and comments for picking paths (diff)
downloadvim-spellfile-local-master.tar.gz
vim-spellfile-local-master.zip
Merge branch 'release/v2.0.0'HEADv2.0.0masterdevelop
* release/v2.0.0: Adjust logic and comments for picking paths Require Vim version 8.0, inline OptionSet If OptionSet is available, trigger on 'spelllang' Add a version guard
Diffstat (limited to 'plugin')
-rw-r--r--plugin/spellfile_local.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/spellfile_local.vim b/plugin/spellfile_local.vim
index 0730775..be2956c 100644
--- a/plugin/spellfile_local.vim
+++ b/plugin/spellfile_local.vim
@@ -6,7 +6,7 @@
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
-if exists('loaded_spellfile_local') || &compatible
+if exists('loaded_spellfile_local') || &compatible || v:version < 800
finish
endif
let loaded_spellfile_local = 1
@@ -17,4 +17,6 @@ let loaded_spellfile_local = 1
augroup spellfile_local
autocmd BufFilePost,BufNewFile,BufRead,EncodingChanged,FileType *
\ call spellfile_local#()
+ autocmd OptionSet spelllang
+ \ call spellfile_local#()
augroup END