changeset 31251:e8ac01ad4be9 v9.0.0959

patch 9.0.0959: error when using the "File Settings / Text Width" menu Commit: https://github.com/vim/vim/commit/8b336a6614463fb9ce72db24d00c5aef4f22697e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 27 15:51:46 2022 +0000 patch 9.0.0959: error when using the "File Settings / Text Width" menu Problem: Error when using the "File Settings / Text Width" menu. Solution: Use str2nr(). (closes https://github.com/vim/vim/issues/11624)
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Nov 2022 17:00:04 +0100
parents 65c361477a7d
children 486b3696206f
files runtime/menu.vim src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/menu.vim
+++ b/runtime/menu.vim
@@ -341,7 +341,7 @@ def s:TextWidth()
     # Remove leading zeros to avoid it being used as an octal number.
     # But keep a zero by itself.
     var tw = substitute(n, "^0*", "", "")
-    &tw = tw == '' ? 0 : tw
+    &tw = tw == '' ? 0 : str2nr(tw)
   endif
 enddef
 
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    959,
+/**/
     958,
 /**/
     957,