changeset 28804:12bbd8a31cac v8.2.4926

patch 8.2.4926: #ifdef for crypt feature around too many lines Commit: https://github.com/vim/vim/commit/51f0bc31d3cf512508419064faac0e5b7e52c98b Author: zeertzjq <zeertzjq@outlook.com> Date: Mon May 9 13:33:39 2022 +0100 patch 8.2.4926: #ifdef for crypt feature around too many lines Problem: #ifdef for crypt feature around too many lines. Solution: Move code outside of #ifdef. (closes https://github.com/vim/vim/issues/10388)
author Bram Moolenaar <Bram@vim.org>
date Mon, 09 May 2022 14:45:03 +0200
parents d1e32dd3e6d0
children 2a1287ec767f
files src/option.c src/version.c
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -4012,15 +4012,15 @@ get_option_value(
 	    return gov_hidden_string;
 	if (stringval != NULL)
 	{
+	    if ((char_u **)varp == &p_pt)	// 'pastetoggle'
+		*stringval = str2special_save(*(char_u **)(varp), FALSE);
 #ifdef FEAT_CRYPT
 	    // never return the value of the crypt key
-	    if ((char_u **)varp == &curbuf->b_p_key
+	    else 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);
+#endif
 	    else
-#endif
 		*stringval = vim_strsave(*(char_u **)(varp));
 	}
 	return gov_string;
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4926,
+/**/
     4925,
 /**/
     4924,