Mercurial > vim
comparison src/terminal.c @ 29994:86eb4aba16c3 v9.0.0335
patch 9.0.0335: checks for Dictionary argument often give a vague error
Commit: https://github.com/vim/vim/commit/04c4c5746e15884768d2cb41370c3276a196cd4c
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Aug 30 19:48:24 2022 +0100
patch 9.0.0335: checks for Dictionary argument often give a vague error
Problem: Checks for Dictionary argument often give a vague error message.
Solution: Give a useful error message. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/11009)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 30 Aug 2022 21:00:05 +0200 |
parents | f661bbf74a6d |
children | adb0de8be4ce |
comparison
equal
deleted
inserted
replaced
29993:8dd1900432a0 | 29994:86eb4aba16c3 |
---|---|
4987 | 4987 |
4988 if (argvars[2].v_type != VAR_UNKNOWN) | 4988 if (argvars[2].v_type != VAR_UNKNOWN) |
4989 { | 4989 { |
4990 dict_T *d; | 4990 dict_T *d; |
4991 | 4991 |
4992 if (argvars[2].v_type != VAR_DICT) | 4992 if (check_for_dict_arg(argvars, 2) == FAIL) |
4993 { | |
4994 emsg(_(e_dictionary_required)); | |
4995 return; | 4993 return; |
4996 } | |
4997 d = argvars[2].vval.v_dict; | 4994 d = argvars[2].vval.v_dict; |
4998 if (d != NULL) | 4995 if (d != NULL) |
4999 { | 4996 { |
5000 max_height = dict_get_number(d, "rows"); | 4997 max_height = dict_get_number(d, "rows"); |
5001 max_width = dict_get_number(d, "columns"); | 4998 max_width = dict_get_number(d, "columns"); |