Skip to content

Commit

Permalink
patch 8.0.1172: when E734 is given option is still set
Browse files Browse the repository at this point in the history
Problem:    When E734 is given option is still set.
Solution:   Assign NULL to "s". (Christian Brabandt)
  • Loading branch information
brammool committed Oct 2, 2017
1 parent 712549e commit 2a6a6c3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/eval.c
Expand Up @@ -1704,7 +1704,10 @@ ex_let_one(
&stringval, opt_flags);
if ((opt_type == 1 && *op == '.')
|| (opt_type == 0 && *op != '.'))
{
EMSG2(_(e_letwrong), op);
s = NULL; /* don't set the value */
}
else
{
if (opt_type == 1) /* number */
Expand Down
14 changes: 14 additions & 0 deletions src/testdir/test_assign.vim
Expand Up @@ -29,3 +29,17 @@ func Test_let_termcap()
let &t_xx = ""
call assert_fails('let x = &t_xx', 'E15')
endfunc

func Test_let_option_error()
let _w = &tw
let &tw = 80
call assert_fails('let &tw .= 1', 'E734')
call assert_equal(80, &tw)
let &tw = _w

let _w = &fillchars
let &fillchars = "vert:|"
call assert_fails('let &fillchars += "diff:-"', 'E734')
call assert_equal("vert:|", &fillchars)
let &fillchars = _w
endfunc
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -761,6 +761,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1172,
/**/
1171,
/**/
Expand Down

0 comments on commit 2a6a6c3

Please sign in to comment.