Mercurial > vim
comparison src/testdir/test_terminal.vim @ 26105:fd1cbe72815a v8.2.3585
patch 8.2.3585: crash when passing float to "term_rows" of term_start()
Commit: https://github.com/vim/vim/commit/88137396733896eb5e49c2b3b73d9a496d6ce49a
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 12 16:01:15 2021 +0000
patch 8.2.3585: crash when passing float to "term_rows" of term_start()
Problem: Crash when passing float to "term_rows" in the options argument of
term_start(). (Virginia Senioria)
Solution: Bail out if the argument is not a number. (closes #9116)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Nov 2021 17:15:03 +0100 |
parents | a5a772dace5b |
children | c421c9599d83 |
comparison
equal
deleted
inserted
replaced
26104:e0a8da7d5b54 | 26105:fd1cbe72815a |
---|---|
464 | 464 |
465 call term_start(cmd, {'vertical': 1, 'term_rows': 7, 'term_cols': 27}) | 465 call term_start(cmd, {'vertical': 1, 'term_rows': 7, 'term_cols': 27}) |
466 let size = term_getsize('') | 466 let size = term_getsize('') |
467 bwipe! | 467 bwipe! |
468 call assert_equal([7, 27], size) | 468 call assert_equal([7, 27], size) |
469 | |
470 if has('float') | |
471 call assert_fails("call term_start(cmd, {'term_rows': 10.0})", 'E805:') | |
472 endif | |
469 | 473 |
470 call delete('Xtext') | 474 call delete('Xtext') |
471 endfunc | 475 endfunc |
472 | 476 |
473 func Test_terminal_zero_height() | 477 func Test_terminal_zero_height() |