From 8b336a6614463fb9ce72db24d00c5aef4f22697e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 27 Nov 2022 15:51:46 +0000 Subject: [PATCH] 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 #11624) --- runtime/menu.vim | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/menu.vim b/runtime/menu.vim index d449a75102..ab509a6927 100644 --- 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 diff --git a/src/version.c b/src/version.c index 115c5991ac..cd6f0b6736 100644 --- a/src/version.c +++ b/src/version.c @@ -695,6 +695,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 959, /**/ 958, /**/