aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-04-15 21:03:02 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-04-27 21:34:54 +0200
commit83d571653bdc100d8fe56b4241f29a1aa996c705 (patch)
tree9b040903763276971672ffdb80d7bced6f8d00ce
parent1039e0621d4c23d42d513efdf413d4767db9bccb (diff)
downloadrneovim-83d571653bdc100d8fe56b4241f29a1aa996c705.tar.gz
rneovim-83d571653bdc100d8fe56b4241f29a1aa996c705.tar.bz2
rneovim-83d571653bdc100d8fe56b4241f29a1aa996c705.zip
spellfile.vim: store files in stdpath('data')
ref b9b2fb7d5d03 #6664 #6272
-rw-r--r--runtime/autoload/spellfile.vim14
1 files changed, 2 insertions, 12 deletions
diff --git a/runtime/autoload/spellfile.vim b/runtime/autoload/spellfile.vim
index 9ec6091218..c0ef51cdfe 100644
--- a/runtime/autoload/spellfile.vim
+++ b/runtime/autoload/spellfile.vim
@@ -195,16 +195,6 @@ function! spellfile#GetDirChoices()
endfunc
function! spellfile#WritableSpellDir()
- " Always use the $XDG_DATA_HOME/nvim/site directory
- if exists('$XDG_DATA_HOME')
- return $XDG_DATA_HOME . "/nvim/site/spell"
- elseif !(has('win32') || has('win64'))
- return $HOME . "/.local/share/nvim/site/spell"
- endif
- for dir in split(&rtp, ',')
- if filewritable(dir) == 2
- return dir . "/spell"
- endif
- endfor
- return ''
+ " Always use the $XDG_DATA_HOME/…/site directory
+ return stdpath('data').'/site/spell'
endfunction