Mercurial > vim
comparison src/map.c @ 22055:88bedbb4ba75 v8.2.1577
patch 8.2.1577: Vim9: hasmapto()/mapcheck()/maparg() do nottake "true" arg
Commit: https://github.com/vim/vim/commit/04d594b9c14299ed50da0774fb8d3a10fbc4076f
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 2 22:25:35 2020 +0200
patch 8.2.1577: Vim9: hasmapto()/mapcheck()/maparg() do nottake "true" arg
Problem: Vim9: hasmapto(), mapcheck() and maparg() do not take "true" as
argument.
Solution: Use tv_get_bool(). (closes #6822, closes #6824)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 02 Sep 2020 22:30:03 +0200 |
parents | 808edde1e97d |
children | 9b09676b9e0e |
comparison
equal
deleted
inserted
replaced
22054:a7d9a93a4d80 | 22055:88bedbb4ba75 |
---|---|
2202 if (argvars[1].v_type != VAR_UNKNOWN) | 2202 if (argvars[1].v_type != VAR_UNKNOWN) |
2203 { | 2203 { |
2204 which = tv_get_string_buf_chk(&argvars[1], buf); | 2204 which = tv_get_string_buf_chk(&argvars[1], buf); |
2205 if (argvars[2].v_type != VAR_UNKNOWN) | 2205 if (argvars[2].v_type != VAR_UNKNOWN) |
2206 { | 2206 { |
2207 abbr = (int)tv_get_number(&argvars[2]); | 2207 abbr = (int)tv_get_bool(&argvars[2]); |
2208 if (argvars[3].v_type != VAR_UNKNOWN) | 2208 if (argvars[3].v_type != VAR_UNKNOWN) |
2209 get_dict = (int)tv_get_number(&argvars[3]); | 2209 get_dict = (int)tv_get_bool(&argvars[3]); |
2210 } | 2210 } |
2211 } | 2211 } |
2212 else | 2212 else |
2213 which = (char_u *)""; | 2213 which = (char_u *)""; |
2214 if (which == NULL) | 2214 if (which == NULL) |