Patch 8.1.2168
Problem:    Heredoc assignment not skipped in if block.
Solution:   Check if "skip" is set. (closes #5063)
Files:      src/evalvars.c, src/testdir/test_let.vim


*** ../vim-8.1.2167/src/evalvars.c      2019-09-05 22:33:23.268963478 +0200
--- src/evalvars.c      2019-10-16 22:50:55.759743711 +0200
***************
*** 756,765 ****
        if (l != NULL)
        {
            rettv_list_set(&rettv, l);
!           op[0] = '=';
!           op[1] = NUL;
!           (void)ex_let_vars(eap->arg, &rettv, FALSE, semicolon, var_count,
                                                                is_const, op);
            clear_tv(&rettv);
        }
      }
--- 756,768 ----
        if (l != NULL)
        {
            rettv_list_set(&rettv, l);
!           if (!eap->skip)
!           {
!               op[0] = '=';
!               op[1] = NUL;
!               (void)ex_let_vars(eap->arg, &rettv, FALSE, semicolon, var_count,
                                                                is_const, op);
+           }
            clear_tv(&rettv);
        }
      }
*** ../vim-8.1.2167/src/testdir/test_let.vim    2019-07-21 23:04:14.079123854 
+0200
--- src/testdir/test_let.vim    2019-10-16 22:53:53.243167740 +0200
***************
*** 295,298 ****
--- 295,306 ----
    app
    END
    call assert_equal(['something', 'app'], var1)
+ 
+   let check = []
+   if 0
+      let check =<< trim END
+        from heredoc
+      END
+   endif
+   call assert_equal([], check)
  endfunc
*** ../vim-8.1.2167/src/version.c       2019-10-16 23:33:09.214421043 +0200
--- src/version.c       2019-10-16 23:34:08.678384618 +0200
***************
*** 755,756 ****
--- 755,758 ----
  {   /* Add new patch number below this line */
+ /**/
+     2168,
  /**/

-- 
A disclaimer for the disclaimer:
"and before I get a huge amount of complaints , I have no control over the
disclaimer at the end of this mail :-)" (Timothy Aldrich)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201910162135.x9GLZ5nd000885%40masaka.moolenaar.net.

Raspunde prin e-mail lui