1
0
forked from aniani/vim

patch 8.2.1616: Vim9: cannot pass "true" to synID()

Problem:    Vim9: cannot pass "true" to synID().
Solution:   Use tv_get_bool_chk(). (closes #6860)
This commit is contained in:
Bram Moolenaar
2020-09-05 21:41:56 +02:00
parent 30788d3d37
commit fcb6d7082d
3 changed files with 10 additions and 1 deletions

View File

@@ -8487,7 +8487,7 @@ f_synID(typval_T *argvars UNUSED, typval_T *rettv)
lnum = tv_get_lnum(argvars); // -1 on type error
col = (linenr_T)tv_get_number(&argvars[1]) - 1; // -1 on type error
trans = (int)tv_get_number_chk(&argvars[2], &transerr);
trans = (int)tv_get_bool_chk(&argvars[2], &transerr);
if (!transerr && lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
&& col >= 0 && col < (long)STRLEN(ml_get(lnum)))