Mercurial > vim
changeset 5010:b614332f7df2 v7.3.1249
updated for version 7.3.1249
Problem: Modeline not recognized when using "Vim" instead of "vim".
Solution: Also accept "Vim".
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 26 Jun 2013 20:04:35 +0200 |
parents | 5b276335bfdb |
children | 65c893c97211 |
files | src/buffer.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buffer.c +++ b/src/buffer.c @@ -5096,7 +5096,8 @@ chk_modeline(lnum, flags) if ((prev != -1 && STRNCMP(s, "ex:", (size_t)3) == 0) || STRNCMP(s, "vi:", (size_t)3) == 0) break; - if (STRNCMP(s, "vim", 3) == 0) + /* Accept both "vim" and "Vim". */ + if ((s[0] == 'v' || s[0] == 'V') && s[1] == 'i' && s[2] == 'm') { if (s[3] == '<' || s[3] == '=' || s[3] == '>') e = s + 4;