aboutsummaryrefslogtreecommitdiff
path: root/autoload/spellfile_local.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2023-04-03 17:24:51 +1200
committerTom Ryder <tom@sanctum.geek.nz>2023-04-06 15:47:01 +1200
commitf14965af391b2f89ce26369eec3e333c98fbcdde (patch)
treeb520a20e21938d9c8ea539bd4cd9187b1210dd6d /autoload/spellfile_local.vim
parentAdd a version guard (diff)
downloadvim-spellfile-local-f14965af391b2f89ce26369eec3e333c98fbcdde.tar.gz
vim-spellfile-local-f14965af391b2f89ce26369eec3e333c98fbcdde.zip
If OptionSet is available, trigger on 'spelllang'
We have to switch from <afile> to simply expanding % here, because <afile> doesn't expand to the buffer's filename when OptionSet fires.
Diffstat (limited to 'autoload/spellfile_local.vim')
-rw-r--r--autoload/spellfile_local.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/spellfile_local.vim b/autoload/spellfile_local.vim
index 177503f..7573c45 100644
--- a/autoload/spellfile_local.vim
+++ b/autoload/spellfile_local.vim
@@ -23,7 +23,7 @@ function! spellfile_local#() abort
" filetype.lang.encoding.add.
"
let basenames = [s:Filename([lang, encoding, 'add'])]
- let path = expand('<afile>:p')
+ let path = expand('%:p')
call add(
\ basenames,
\ s:Filename(['path', path, lang, encoding, 'add'])