diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-09-29 18:26:07 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-09-29 18:26:07 +0000 |
commit | 482aaeb058a3c05235148d22f6c511416da009fb (patch) | |
tree | b9c63e97ec2826bfeea041afe176a04763dbcfa8 /src/option.c | |
parent | 4463f296d0744915fa25dbd893821833043f9a25 (diff) | |
download | vim-git-482aaeb058a3c05235148d22f6c511416da009fb.tar.gz |
updated for version 7.0151v7.0151
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c index d547edc1e..b3c80d6a4 100644 --- a/src/option.c +++ b/src/option.c @@ -3277,6 +3277,7 @@ set_init_2() * "linux" Linux console * "screen.linux" Linux console with screen * "cygwin" Cygwin shell + * "putty" Putty program * We also check the COLORFGBG environment variable, which is set by * rxvt and derivatives. This variable contains either two or three * values separated by semicolons; we want the last value in either @@ -3287,6 +3288,7 @@ set_init_2() && (STRCMP(T_NAME, "linux") == 0 || STRCMP(T_NAME, "screen.linux") == 0 || STRCMP(T_NAME, "cygwin") == 0 + || STRCMP(T_NAME, "putty") == 0 || ((p = mch_getenv((char_u *)"COLORFGBG")) != NULL && (p = vim_strrchr(p, ';')) != NULL && ((p[1] >= '0' && p[1] <= '6') || p[1] == '8') @@ -7343,6 +7345,11 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags) } Columns = MIN_COLUMNS; } + /* Limit the values to avoid an overflow in Rows * Columns. */ + if (Columns > 10000) + Columns = 10000; + if (Rows > 1000) + Rows = 1000; #ifdef DJGPP /* avoid a crash by checking for a too large value of 'columns' */ |