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)
diff --git a/runtime/menu.vim b/runtime/menu.vim
index d449a75..ab509a6 100644
--- a/runtime/menu.vim
+++ b/runtime/menu.vim
@@ -341,7 +341,7 @@
# 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