Merge pull request #7311 from ckelsel/vim-8.0.0333

vim-patch:8.0.0333
This commit is contained in:
James McCoy 2017-09-26 15:06:08 -04:00 committed by GitHub
commit b3905c44d1
3 changed files with 15 additions and 4 deletions

View File

@ -2997,9 +2997,10 @@ did_set_string_option (
if (s[-1] == 'k' || s[-1] == 's') { if (s[-1] == 'k' || s[-1] == 's') {
/* skip optional filename after 'k' and 's' */ /* skip optional filename after 'k' and 's' */
while (*s && *s != ',' && *s != ' ') { while (*s && *s != ',' && *s != ' ') {
if (*s == '\\') if (*s == '\\' && s[1] != NUL) {
++s; s++;
++s; }
s++;
} }
} else { } else {
if (errbuf != NULL) { if (errbuf != NULL) {

View File

@ -103,3 +103,13 @@ func Test_keymap_valid()
call assert_fails(":set kmp=trunc\x00name", "E544:") call assert_fails(":set kmp=trunc\x00name", "E544:")
call assert_fails(":set kmp=trunc\x00name", "trunc") call assert_fails(":set kmp=trunc\x00name", "trunc")
endfunc endfunc
func Test_complete()
" Trailing single backslash used to cause invalid memory access.
set complete=s\
new
call feedkeys("i\<C-N>\<Esc>", 'xt')
bwipe!
set complete&
endfun

View File

@ -619,7 +619,7 @@ static const int included_patches[] = {
// 336, // 336,
// 335, // 335,
// 334, // 334,
// 333, 333,
// 332, // 332,
331, 331,
// 330, // 330,