1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2022-11-27 15:51:46 +00:00
parent 19cf525c20
commit 8b336a6614
2 changed files with 3 additions and 1 deletions

View File

@@ -341,7 +341,7 @@ def s:TextWidth()
# Remove leading zeros to avoid it being used as an octal number. # Remove leading zeros to avoid it being used as an octal number.
# But keep a zero by itself. # But keep a zero by itself.
var tw = substitute(n, "^0*", "", "") var tw = substitute(n, "^0*", "", "")
&tw = tw == '' ? 0 : tw &tw = tw == '' ? 0 : str2nr(tw)
endif endif
enddef enddef

View File

@@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
959,
/**/ /**/
958, 958,
/**/ /**/