]> granicus.if.org Git - vim/commitdiff
patch 9.0.0959: error when using the "File Settings / Text Width" menu v9.0.0959
authorBram Moolenaar <Bram@vim.org>
Sun, 27 Nov 2022 15:51:46 +0000 (15:51 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 27 Nov 2022 15:51:46 +0000 (15:51 +0000)
Problem:    Error when using the "File Settings / Text Width" menu.
Solution:   Use str2nr(). (closes #11624)

runtime/menu.vim
src/version.c

index d449a75102b171533c1e4377198c950b07336848..ab509a69277e15f25ac0c7948a70fdf9c11a685c 100644 (file)
@@ -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
 
index 115c5991acef1d85d7a35475dca33c38b2718566..cd6f0b6736c7ac90deb7a71a850ae8c2f9e3c16d 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    959,
 /**/
     958,
 /**/