To: vim_dev@googlegroups.com Subject: Patch 8.0.0743 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0743 Problem: The 'termsize' option can be set to an invalid value. Solution: Check the 'termsize' option to be valid. Files: src/option.c, src/testdir/gen_opt_test.vim *** ../vim-8.0.0742/src/option.c 2017-07-15 19:22:33.642179911 +0200 --- src/option.c 2017-07-22 17:03:47.219875138 +0200 *************** *** 7479,7484 **** --- 7479,7497 ---- } #endif + #ifdef FEAT_TERMINAL + /* 'termsize' */ + else if (varp == &curwin->w_p_tms) + { + if (*curwin->w_p_tms != NUL) + { + p = skipdigits(curwin->w_p_tms); + if (p == curwin->w_p_tms || *p != 'x' || *skipdigits(p + 1) != NUL) + errmsg = e_invarg; + } + } + #endif + /* Options that are a list of flags. */ else { *** ../vim-8.0.0742/src/testdir/gen_opt_test.vim 2017-04-23 18:44:22.985227930 +0200 --- src/testdir/gen_opt_test.vim 2017-07-22 16:54:35.995826106 +0200 *************** *** 124,129 **** --- 124,130 ---- \ 'switchbuf': [['', 'useopen', 'split,newtab'], ['xxx']], \ 'tagcase': [['smart', 'match'], ['', 'xxx', 'smart,match']], \ 'term': [[], []], + \ 'termsize': [['', '24x80', '0x80', '32x0', '0x0'], ['xxx', '80', '8ax9', '24x80b']], \ 'toolbar': [['', 'icons', 'text'], ['xxx']], \ 'toolbariconsize': [['', 'tiny', 'huge'], ['xxx']], \ 'ttymouse': [['', 'xterm'], ['xxx']], *** ../vim-8.0.0742/src/version.c 2017-07-22 16:14:39.276915783 +0200 --- src/version.c 2017-07-22 17:03:04.100185757 +0200 *************** *** 771,772 **** --- 771,774 ---- { /* Add new patch number below this line */ + /**/ + 743, /**/ -- $ echo pizza > /dev/oven /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///