diff 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
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -8400,7 +8400,7 @@ f_submatch(typval_T *argvars, typval_T *
 	return;
     }
     if (argvars[1].v_type != VAR_UNKNOWN)
-	retList = (int)tv_get_number_chk(&argvars[1], &error);
+	retList = (int)tv_get_bool_chk(&argvars[1], &error);
     if (error)
 	return;