Mercurial > vim
comparison src/evalfunc.c @ 22155:de47cb7b41e6 v8.2.1627
patch 8.2.1627: Vim9: cannot pass "true" to submatch/term_gettty/term_start
Commit: https://github.com/vim/vim/commit/ad30470610e228e66afb837fdbab6bea36c43de4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 6 18:22:53 2020 +0200
patch 8.2.1627: Vim9: cannot pass "true" to submatch/term_gettty/term_start
Problem: Vim9: cannot pass "true" to submatch(), term_gettty() and
term_start()
Solution: Use tv_get_bool_chk(). (closes #6888, closes #6890, closes #6889)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 06 Sep 2020 18:30:03 +0200 |
parents | 49b3a95adf04 |
children | b6d36f0b4f03 |
comparison
equal
deleted
inserted
replaced
22154:6387a3c9e9ef | 22155:de47cb7b41e6 |
---|---|
8398 { | 8398 { |
8399 semsg(_("E935: invalid submatch number: %d"), no); | 8399 semsg(_("E935: invalid submatch number: %d"), no); |
8400 return; | 8400 return; |
8401 } | 8401 } |
8402 if (argvars[1].v_type != VAR_UNKNOWN) | 8402 if (argvars[1].v_type != VAR_UNKNOWN) |
8403 retList = (int)tv_get_number_chk(&argvars[1], &error); | 8403 retList = (int)tv_get_bool_chk(&argvars[1], &error); |
8404 if (error) | 8404 if (error) |
8405 return; | 8405 return; |
8406 | 8406 |
8407 if (retList == 0) | 8407 if (retList == 0) |
8408 { | 8408 { |