Patch 8.2.3475
Problem:    Expression register set by not executed put command.
Solution:   Do not set the register if the command is skipped. (closes #8909)
Files:      src/ex_docmd.c, src/testdir/test_excmd.vim


*** ../vim-8.2.3474/src/ex_docmd.c      2021-09-12 12:39:04.323467415 +0100
--- src/ex_docmd.c      2021-10-04 22:14:23.116256124 +0100
***************
*** 2382,2390 ****
            // for '=' register: accept the rest of the line as an expression
            if (ea.arg[-1] == '=' && ea.arg[0] != NUL)
            {
!               set_expr_line(vim_strsave(ea.arg), &ea);
                ea.arg += STRLEN(ea.arg);
-               did_set_expr_line = TRUE;
            }
  #endif
            ea.arg = skipwhite(ea.arg);
--- 2382,2393 ----
            // for '=' register: accept the rest of the line as an expression
            if (ea.arg[-1] == '=' && ea.arg[0] != NUL)
            {
!               if (!ea.skip)
!               {
!                   set_expr_line(vim_strsave(ea.arg), &ea);
!                   did_set_expr_line = TRUE;
!               }
                ea.arg += STRLEN(ea.arg);
            }
  #endif
            ea.arg = skipwhite(ea.arg);
*** ../vim-8.2.3474/src/testdir/test_excmd.vim  2021-08-09 20:04:20.944157290 
+0100
--- src/testdir/test_excmd.vim  2021-10-04 22:14:23.116256124 +0100
***************
*** 647,650 ****
--- 647,658 ----
    endif
  endfunc
  
+ func Test_not_break_expression_register()
+   call setreg('=', '1+1')
+   if 0
+     put =1
+   endif
+   call assert_equal('1+1', getreg('=', 1))
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.3474/src/version.c       2021-10-04 21:51:53.779991087 +0100
--- src/version.c       2021-10-04 22:16:29.033492875 +0100
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     3475,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
94. Now admit it... How many of you have made "modem noises" into
    the phone just to see if it was possible? :-)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/20211004212816.C000DC80053%40pakwach.

Raspunde prin e-mail lui