Patch 8.2.0824 (after 8.2.0817)
Problem:    Still not enough memory allocated when converting string with
            special character.
Solution:   Reserve space for expanding K_SPECIAL. (closes #6130)
Files:      src/eval.c, src/testdir/test_functions.vim


*** ../vim-8.2.0823/src/eval.c  2020-05-24 23:00:06.440196016 +0200
--- src/eval.c  2020-05-25 22:55:02.354536931 +0200
***************
*** 3515,3524 ****
        {
            ++p;
            // A "\<x>" form occupies at least 4 characters, and produces up
!           // to 9 characters (6 for the char and 3 for a modifier): reserve
!           // space for 5 extra.
            if (*p == '<')
!               extra += 5;
        }
      }
  
--- 3515,3525 ----
        {
            ++p;
            // A "\<x>" form occupies at least 4 characters, and produces up
!           // to 21 characters (3 * 6 for the char and 3 for a modifier):
!           // reserve space for 18 extra.
!           // Each byte in the char could be encoded as K_SPECIAL K_EXTRA x.
            if (*p == '<')
!               extra += 18;
        }
      }
  
*** ../vim-8.2.0823/src/testdir/test_functions.vim      2020-05-24 
18:45:04.083820033 +0200
--- src/testdir/test_functions.vim      2020-05-25 23:00:06.725658239 +0200
***************
*** 2280,2285 ****
--- 2280,2286 ----
    call assert_equal('a', nr2char(97, 0))
  
    call assert_equal("\x80\xfc\b\xf4\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' 
.. nr2char(0x100000) .. '>"'))
+   call 
assert_equal("\x80\xfc\b\xfd\x80\xfeX\x80\xfeX\x80\xfeX\x80\xfeX\x80\xfeX", 
eval('"\<M-' .. nr2char(0x40000000) .. '>"'))
  endfunc
  
  " Test for screenattr(), screenchar() and screenchars() functions
*** ../vim-8.2.0823/src/version.c       2020-05-25 22:36:46.629735032 +0200
--- src/version.c       2020-05-25 23:01:07.389483674 +0200
***************
*** 748,749 ****
--- 748,751 ----
  {   /* Add new patch number below this line */
+ /**/
+     824,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
177. You log off of your system because it's time to go to work.

 /// 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/202005252102.04PL274S414244%40masaka.moolenaar.net.

Raspunde prin e-mail lui