summaryrefslogtreecommitdiff
path: root/runtime/menu.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-05-17 18:14:19 +0200
committerBram Moolenaar <Bram@vim.org>2013-05-17 18:14:19 +0200
commitad3b366c8250a6f3c7ac699bc4b0f2e613286089 (patch)
tree23a07a413110c9587852eb5ec0e29119d3debc62 /runtime/menu.vim
parentd620aa9be4d574627c020dedd39313f8482ab216 (diff)
downloadvim-ad3b366c8250a6f3c7ac699bc4b0f2e613286089.zip
Update runtime files.
Diffstat (limited to 'runtime/menu.vim')
-rw-r--r--runtime/menu.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/menu.vim b/runtime/menu.vim
index 656212e41..f4ff9dce8 100644
--- a/runtime/menu.vim
+++ b/runtime/menu.vim
@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2012 Dec 06
+" Last Change: 2013 May 17
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -308,8 +308,10 @@ fun! s:TextWidth()
endif
let n = inputdialog(g:menutrans_textwidth_dialog, &tw)
if n != ""
- " remove leading zeros to avoid it being used as an octal number
- let &tw = substitute(n, "^0*", "", "")
+ " Remove leading zeros to avoid it being used as an octal number.
+ " But keep a zero by itself.
+ let tw = substitute(n, "^0*", "", "")
+ let &tw = tw == '' ? 0 : tw
endif
endfun