1
0
forked from aniani/vim

patch 8.2.4924: maparg() may return a string that cannot be reused

Problem:    maparg() may return a string that cannot be reused.
Solution:   use msg_outtrans_special() instead of str2special().
            (closes #10384)
This commit is contained in:
zeertzjq
2022-05-09 12:16:19 +01:00
committed by Bram Moolenaar
parent 194843028e
commit 0519ce0039
6 changed files with 60 additions and 21 deletions

View File

@@ -4017,6 +4017,8 @@ get_option_value(
if ((char_u **)varp == &curbuf->b_p_key
&& **(char_u **)(varp) != NUL)
*stringval = vim_strsave((char_u *)"*****");
else if ((char_u **)varp == &p_pt) // 'pastetoggle'
*stringval = str2special_save(*(char_u **)(varp), FALSE);
else
#endif
*stringval = vim_strsave(*(char_u **)(varp));