aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorAbdelhakeem <abdelhakeem.osama@hotmail.com>2019-03-26 18:17:19 +0200
committerAbdelhakeem <abdelhakeem.osama@hotmail.com>2019-03-28 18:12:30 +0200
commit5eaa45547975c652e594d0d6dbe34c1316873dc7 (patch)
tree691e5486a57852e680dcbbdf9d1607de05903987 /src/nvim/option.c
parent76204da1f8ed63f7b0ef15ad7c71ce6e2e58d8fb (diff)
downloadrneovim-5eaa45547975c652e594d0d6dbe34c1316873dc7.tar.gz
rneovim-5eaa45547975c652e594d0d6dbe34c1316873dc7.tar.bz2
rneovim-5eaa45547975c652e594d0d6dbe34c1316873dc7.zip
vim-patch:8.1.0539: cannot build without the sandbox
Problem: Cannot build without the sandbox. Solution: Set the secure option instead of using the sandbox. Also restrict the characters from 'spelllang' that are used for LANG.vim. (suggested by Yasuhiro Matsumoto) https://github.com/vim/vim/commit/82e8c92ebef5afcac0c0fdb706ff163f9b3366f7
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 0f6408c9d4..af2fe33505 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -3296,11 +3296,13 @@ ambw_end:
* '.encoding'.
*/
for (p = q; *p != NUL; ++p)
- if (vim_strchr((char_u *)"_.,", *p) != NULL)
+ if (!ASCII_ISALPHA(*p) && *p != '-')
break;
- vim_snprintf((char *)fname, sizeof(fname), "spell/%.*s.vim",
- (int)(p - q), q);
- source_runtime(fname, DIP_ALL);
+ if (p > q) {
+ vim_snprintf((char *)fname, sizeof(fname), "spell/%.*s.vim",
+ (int)(p - q), q);
+ source_runtime(fname, DIP_ALL);
+ }
}
}