diff options
author | ckelsel <ckelsel@hotmail.com> | 2017-09-24 09:16:59 +0800 |
---|---|---|
committer | ckelsel <ckelsel@hotmail.com> | 2017-09-24 09:16:59 +0800 |
commit | 90fc9039ddcadc61d4236bdd2d638d690081e04d (patch) | |
tree | ecf08d95a7c9459fa5a79202d85e6666c3f5ee88 /src/nvim/option.c | |
parent | 6258e33b114dc4386e608a5cf3a48742757441f7 (diff) | |
parent | 4bb0e95abbf0a61d383d5261019a2667706c9d39 (diff) | |
download | rneovim-90fc9039ddcadc61d4236bdd2d638d690081e04d.tar.gz rneovim-90fc9039ddcadc61d4236bdd2d638d690081e04d.tar.bz2 rneovim-90fc9039ddcadc61d4236bdd2d638d690081e04d.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 8ba10fd38a..74250e83e6 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1749,7 +1749,7 @@ do_set ( if (flags & P_FLAGLIST) { // Remove flags that appear twice. - for (s = newval; *s; s++) { + for (s = newval; *s;) { // if options have P_FLAGLIST and P_ONECOMMA such as // 'whichwrap' if (flags & P_ONECOMMA) { @@ -1757,15 +1757,16 @@ do_set ( && vim_strchr(s + 2, *s) != NULL) { // Remove the duplicated value and the next comma. STRMOVE(s, s + 2); - s -= 2; + continue; } } else { if ((!(flags & P_COMMA) || *s != ',') && vim_strchr(s + 1, *s) != NULL) { STRMOVE(s, s + 1); - s--; + continue; } } + s++; } } |