To: vim_dev@googlegroups.com Subject: Patch 9.0.0335 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0335 Problem: Checks for Dictionary argument often give a vague error message. Solution: Give a useful error message. (Yegappan Lakshmanan, closes #11009) Files: src/channel.c, src/dict.c, src/errors.h, src/evalfunc.c, src/evalwindow.c, src/list.c, src/map.c, src/popupwin.c, src/proto/typval.pro, src/search.c, src/sign.c, src/terminal.c, src/textprop.c, src/time.c, src/typval.c, src/testdir/test_channel.vim, src/testdir/test_charsearch.vim, src/testdir/test_expr.vim, src/testdir/test_functions.vim, src/testdir/test_listdict.vim, src/testdir/test_map_functions.vim, src/testdir/test_matchfuzzy.vim, src/testdir/test_partial.vim, src/testdir/test_popupwin.vim, src/testdir/test_search_stat.vim, src/testdir/test_signs.vim, src/testdir/test_tagjump.vim, src/testdir/test_terminal.vim, src/testdir/test_textprop.vim, src/testdir/test_timers.vim, src/testdir/test_window_cmd.vim *** ../vim-9.0.0334/src/channel.c 2022-08-14 14:16:07.983582313 +0100 --- src/channel.c 2022-08-30 19:12:09.083367581 +0100 *************** *** 1392,1402 **** address = tv_get_string(&argvars[0]); if (argvars[1].v_type != VAR_UNKNOWN ! && (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL)) ! { ! emsg(_(e_invalid_argument)); return NULL; - } if (*address == NUL) { --- 1392,1399 ---- address = tv_get_string(&argvars[0]); if (argvars[1].v_type != VAR_UNKNOWN ! && check_for_nonnull_dict_arg(argvars, 1) == FAIL) return NULL; if (*address == NUL) { *************** *** 4601,4611 **** if (rettv_dict_alloc(rettv) == FAIL) return; ! if (argvars[1].v_type != VAR_DICT) ! { ! semsg(_(e_dict_required_for_argument_nr), 2); return; ! } d = argvars[1].vval.v_dict; di = dict_find(d, (char_u *)"id", -1); if (di != NULL && di->di_tv.v_type != VAR_NUMBER) --- 4598,4606 ---- if (rettv_dict_alloc(rettv) == FAIL) return; ! if (check_for_dict_arg(argvars, 1) == FAIL) return; ! d = argvars[1].vval.v_dict; di = dict_find(d, (char_u *)"id", -1); if (di != NULL && di->di_tv.v_type != VAR_NUMBER) *** ../vim-9.0.0334/src/dict.c 2022-08-30 17:45:28.783606596 +0100 --- src/dict.c 2022-08-30 19:12:09.087367580 +0100 *************** *** 1578,1588 **** || check_for_string_or_number_arg(argvars, 1) == FAIL)) return; ! if (argvars[0].v_type != VAR_DICT) ! { ! emsg(_(e_dictionary_required)); return; ! } if (argvars[0].vval.v_dict == NULL) return; --- 1578,1586 ---- || check_for_string_or_number_arg(argvars, 1) == FAIL)) return; ! if (check_for_dict_arg(argvars, 0) == FAIL) return; ! if (argvars[0].vval.v_dict == NULL) return; *** ../vim-9.0.0334/src/errors.h 2022-08-25 18:12:00.354668433 +0100 --- src/errors.h 2022-08-30 19:12:09.087367580 +0100 *************** *** 3318,3320 **** --- 3318,3322 ---- EXTERN char e_can_only_use_left_padding_when_column_is_zero[] INIT(= N_("E1296: Can only use left padding when column is zero")); #endif + EXTERN char e_non_null_dict_required_for_argument_nr[] + INIT(= N_("E1297: Non-NULL Dictionary required for argument %d")); *** ../vim-9.0.0334/src/evalfunc.c 2022-08-30 17:45:28.787606578 +0100 --- src/evalfunc.c 2022-08-30 19:12:09.087367580 +0100 *************** *** 3277,3287 **** if (argvars[2].v_type != VAR_UNKNOWN) { ! if (argvars[2].v_type != VAR_DICT) ! { ! emsg(_(e_dictionary_required)); return; ! } selfdict = argvars[2].vval.v_dict; } --- 3277,3285 ---- if (argvars[2].v_type != VAR_UNKNOWN) { ! if (check_for_dict_arg(argvars, 2) == FAIL) return; ! selfdict = argvars[2].vval.v_dict; } *************** *** 4501,4509 **** arg_idx = 1; if (dict_idx > 0) { ! if (argvars[dict_idx].v_type != VAR_DICT) { - emsg(_(e_expected_dict)); vim_free(name); goto theend; } --- 4499,4506 ---- arg_idx = 1; if (dict_idx > 0) { ! if (check_for_dict_arg(argvars, dict_idx) == FAIL) { vim_free(name); goto theend; } *************** *** 9291,9305 **** dictitem_T *di; char_u *csearch; ! if (in_vim9script() && check_for_dict_arg(argvars, 0) == FAIL) return; - if (argvars[0].v_type != VAR_DICT) - { - emsg(_(e_dictionary_required)); - return; - } - if ((d = argvars[0].vval.v_dict) != NULL) { csearch = dict_get_string(d, "char", FALSE); --- 9288,9296 ---- dictitem_T *di; char_u *csearch; ! if (check_for_dict_arg(argvars, 0) == FAIL) return; if ((d = argvars[0].vval.v_dict) != NULL) { csearch = dict_get_string(d, "char", FALSE); *************** *** 9637,9647 **** return; // second argument: dict with items to set in the tag stack ! if (argvars[1].v_type != VAR_DICT) ! { ! emsg(_(e_dictionary_required)); return; - } d = argvars[1].vval.v_dict; if (d == NULL) return; --- 9628,9635 ---- return; // second argument: dict with items to set in the tag stack ! if (check_for_dict_arg(argvars, 1) == FAIL) return; d = argvars[1].vval.v_dict; if (d == NULL) return; *** ../vim-9.0.0334/src/evalwindow.c 2022-07-23 09:52:00.333814262 +0100 --- src/evalwindow.c 2022-08-30 19:12:09.087367580 +0100 *************** *** 1009,1019 **** dict_T *d; dictitem_T *di; ! if (argvars[2].v_type != VAR_DICT || argvars[2].vval.v_dict == NULL) ! { ! emsg(_(e_invalid_argument)); return; - } d = argvars[2].vval.v_dict; if (dict_get_bool(d, "vertical", FALSE)) --- 1009,1016 ---- dict_T *d; dictitem_T *di; ! if (check_for_nonnull_dict_arg(argvars, 2) == FAIL) return; d = argvars[2].vval.v_dict; if (dict_get_bool(d, "vertical", FALSE)) *************** *** 1227,1276 **** { dict_T *dict; ! if (in_vim9script() && check_for_dict_arg(argvars, 0) == FAIL) return; ! if (argvars[0].v_type != VAR_DICT ! || (dict = argvars[0].vval.v_dict) == NULL) ! emsg(_(e_invalid_argument)); ! else { ! if (dict_has_key(dict, "lnum")) ! curwin->w_cursor.lnum = (linenr_T)dict_get_number(dict, "lnum"); ! if (dict_has_key(dict, "col")) ! curwin->w_cursor.col = (colnr_T)dict_get_number(dict, "col"); ! if (dict_has_key(dict, "coladd")) ! curwin->w_cursor.coladd = (colnr_T)dict_get_number(dict, "coladd"); ! if (dict_has_key(dict, "curswant")) ! { ! curwin->w_curswant = (colnr_T)dict_get_number(dict, "curswant"); ! curwin->w_set_curswant = FALSE; ! } ! if (dict_has_key(dict, "topline")) ! set_topline(curwin, (linenr_T)dict_get_number(dict, "topline")); #ifdef FEAT_DIFF ! if (dict_has_key(dict, "topfill")) ! curwin->w_topfill = (int)dict_get_number(dict, "topfill"); #endif ! if (dict_has_key(dict, "leftcol")) ! curwin->w_leftcol = (colnr_T)dict_get_number(dict, "leftcol"); ! if (dict_has_key(dict, "skipcol")) ! curwin->w_skipcol = (colnr_T)dict_get_number(dict, "skipcol"); ! ! check_cursor(); ! win_new_height(curwin, curwin->w_height); ! win_new_width(curwin, curwin->w_width); ! changed_window_setting(); ! ! if (curwin->w_topline <= 0) ! curwin->w_topline = 1; ! if (curwin->w_topline > curbuf->b_ml.ml_line_count) ! curwin->w_topline = curbuf->b_ml.ml_line_count; #ifdef FEAT_DIFF ! check_topfill(curwin, TRUE); #endif - } } /* --- 1224,1268 ---- { dict_T *dict; ! if (check_for_nonnull_dict_arg(argvars, 0) == FAIL) return; ! dict = argvars[0].vval.v_dict; ! if (dict_has_key(dict, "lnum")) ! curwin->w_cursor.lnum = (linenr_T)dict_get_number(dict, "lnum"); ! if (dict_has_key(dict, "col")) ! curwin->w_cursor.col = (colnr_T)dict_get_number(dict, "col"); ! if (dict_has_key(dict, "coladd")) ! curwin->w_cursor.coladd = (colnr_T)dict_get_number(dict, "coladd"); ! if (dict_has_key(dict, "curswant")) { ! curwin->w_curswant = (colnr_T)dict_get_number(dict, "curswant"); ! curwin->w_set_curswant = FALSE; ! } ! if (dict_has_key(dict, "topline")) ! set_topline(curwin, (linenr_T)dict_get_number(dict, "topline")); #ifdef FEAT_DIFF ! if (dict_has_key(dict, "topfill")) ! curwin->w_topfill = (int)dict_get_number(dict, "topfill"); #endif ! if (dict_has_key(dict, "leftcol")) ! curwin->w_leftcol = (colnr_T)dict_get_number(dict, "leftcol"); ! if (dict_has_key(dict, "skipcol")) ! curwin->w_skipcol = (colnr_T)dict_get_number(dict, "skipcol"); ! ! check_cursor(); ! win_new_height(curwin, curwin->w_height); ! win_new_width(curwin, curwin->w_width); ! changed_window_setting(); ! ! if (curwin->w_topline <= 0) ! curwin->w_topline = 1; ! if (curwin->w_topline > curbuf->b_ml.ml_line_count) ! curwin->w_topline = curbuf->b_ml.ml_line_count; #ifdef FEAT_DIFF ! check_topfill(curwin, TRUE); #endif } /* *** ../vim-9.0.0334/src/list.c 2022-08-30 17:45:28.783606596 +0100 --- src/list.c 2022-08-30 19:12:09.087367580 +0100 *************** *** 2236,2246 **** if (argvars[2].v_type != VAR_UNKNOWN) { // optional third argument: {dict} ! if (argvars[2].v_type != VAR_DICT) ! { ! emsg(_(e_dictionary_required)); return FAIL; - } info->item_compare_selfdict = argvars[2].vval.v_dict; } --- 2236,2243 ---- if (argvars[2].v_type != VAR_UNKNOWN) { // optional third argument: {dict} ! if (check_for_dict_arg(argvars, 2) == FAIL) return FAIL; info->item_compare_selfdict = argvars[2].vval.v_dict; } *** ../vim-9.0.0334/src/map.c 2022-08-01 11:49:41.218734039 +0100 --- src/map.c 2022-08-30 19:12:09.087367580 +0100 *************** *** 2635,2645 **** return; is_abbr = (int)tv_get_bool(&argvars[1]); ! if (argvars[2].v_type != VAR_DICT) ! { ! emsg(_(e_dictionary_required)); return; - } d = argvars[2].vval.v_dict; } mode = get_map_mode_string(which, is_abbr); --- 2635,2642 ---- return; is_abbr = (int)tv_get_bool(&argvars[1]); ! if (check_for_dict_arg(argvars, 2) == FAIL) return; d = argvars[2].vval.v_dict; } mode = get_map_mode_string(which, is_abbr); *** ../vim-9.0.0334/src/popupwin.c 2022-08-29 18:16:11.578636822 +0100 --- src/popupwin.c 2022-08-30 19:12:09.087367580 +0100 *************** *** 2016,2026 **** emsg(_(e_buffer_number_text_or_list_required)); return NULL; } ! if (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL) ! { ! emsg(_(e_dictionary_required)); return NULL; - } d = argvars[1].vval.v_dict; } --- 2016,2023 ---- emsg(_(e_buffer_number_text_or_list_required)); return NULL; } ! if (check_for_nonnull_dict_arg(argvars, 1) == FAIL) return NULL; d = argvars[1].vval.v_dict; } *************** *** 2928,2938 **** if (wp == NULL) return; // invalid {id} ! if (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL) ! { ! emsg(_(e_dictionary_required)); return; - } dict = argvars[1].vval.v_dict; apply_move_options(wp, dict); --- 2925,2932 ---- if (wp == NULL) return; // invalid {id} ! if (check_for_nonnull_dict_arg(argvars, 1) == FAIL) return; dict = argvars[1].vval.v_dict; apply_move_options(wp, dict); *************** *** 2963,2973 **** if (wp == NULL) return; // invalid {id} ! if (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL) ! { ! emsg(_(e_dictionary_required)); return; - } dict = argvars[1].vval.v_dict; old_firstline = wp->w_firstline; --- 2957,2964 ---- if (wp == NULL) return; // invalid {id} ! if (check_for_nonnull_dict_arg(argvars, 1) == FAIL) return; dict = argvars[1].vval.v_dict; old_firstline = wp->w_firstline; *** ../vim-9.0.0334/src/proto/typval.pro 2022-06-27 23:15:27.000000000 +0100 --- src/proto/typval.pro 2022-08-30 19:12:09.087367580 +0100 *************** *** 22,27 **** --- 22,28 ---- int check_for_list_arg(typval_T *args, int idx); int check_for_opt_list_arg(typval_T *args, int idx); int check_for_dict_arg(typval_T *args, int idx); + int check_for_nonnull_dict_arg(typval_T *args, int idx); int check_for_opt_dict_arg(typval_T *args, int idx); int check_for_chan_or_job_arg(typval_T *args, int idx); int check_for_opt_chan_or_job_arg(typval_T *args, int idx); *** ../vim-9.0.0334/src/search.c 2022-08-14 14:16:07.999582175 +0100 --- src/search.c 2022-08-30 19:12:09.091367576 +0100 *************** *** 764,770 **** col = at_first_line && (options & SEARCH_COL) ? pos->col : (colnr_T)0; nmatched = vim_regexec_multi(®match, win, buf, ! lnum, col, timed_out); // vim_regexec_multi() may clear "regprog" if (regmatch.regprog == NULL) break; --- 764,770 ---- col = at_first_line && (options & SEARCH_COL) ? pos->col : (colnr_T)0; nmatched = vim_regexec_multi(®match, win, buf, ! lnum, col, timed_out); // vim_regexec_multi() may clear "regprog" if (regmatch.regprog == NULL) break; *************** *** 1072,1082 **** * twice. */ if (!p_ws || stop_lnum != 0 || got_int ! || called_emsg > called_emsg_before || *timed_out #ifdef FEAT_SEARCH_EXTRA ! || break_loop #endif ! || found || loop) break; /* --- 1072,1082 ---- * twice. */ if (!p_ws || stop_lnum != 0 || got_int ! || called_emsg > called_emsg_before || *timed_out #ifdef FEAT_SEARCH_EXTRA ! || break_loop #endif ! || found || loop) break; /* *************** *** 4095,4105 **** listitem_T *li; int error = FALSE; ! if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL) ! { ! emsg(_(e_dictionary_required)); return; - } dict = argvars[0].vval.v_dict; di = dict_find(dict, (char_u *)"timeout", -1); if (di != NULL) --- 4095,4102 ---- listitem_T *li; int error = FALSE; ! if (check_for_nonnull_dict_arg(argvars, 0) == FAIL) return; dict = argvars[0].vval.v_dict; di = dict_find(dict, (char_u *)"timeout", -1); if (di != NULL) *************** *** 4815,4825 **** dict_T *d; dictitem_T *di; ! if (argvars[2].v_type != VAR_DICT || argvars[2].vval.v_dict == NULL) ! { ! emsg(_(e_dictionary_required)); return; - } // To search a dict, either a callback function or a key can be // specified. --- 4812,4819 ---- dict_T *d; dictitem_T *di; ! if (check_for_nonnull_dict_arg(argvars, 2) == FAIL) return; // To search a dict, either a callback function or a key can be // specified. *** ../vim-9.0.0334/src/sign.c 2022-08-14 14:16:07.999582175 +0100 --- src/sign.c 2022-08-30 19:12:09.091367576 +0100 *************** *** 2349,2359 **** if (name == NULL) return; ! if (argvars[1].v_type != VAR_UNKNOWN && argvars[1].v_type != VAR_DICT) ! { ! emsg(_(e_dictionary_required)); return; - } rettv->vval.v_number = sign_define_from_dict(name, argvars[1].v_type == VAR_DICT ? argvars[1].vval.v_dict : NULL); --- 2349,2356 ---- if (name == NULL) return; ! if (check_for_opt_dict_arg(argvars, 1) == FAIL) return; rettv->vval.v_number = sign_define_from_dict(name, argvars[1].v_type == VAR_DICT ? argvars[1].vval.v_dict : NULL); *************** *** 2411,2422 **** if (argvars[1].v_type != VAR_UNKNOWN) { ! if (argvars[1].v_type != VAR_DICT || ! ((dict = argvars[1].vval.v_dict) == NULL)) ! { ! emsg(_(e_dictionary_required)); return; ! } if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL) { // get signs placed at this line --- 2408,2416 ---- if (argvars[1].v_type != VAR_UNKNOWN) { ! if (check_for_nonnull_dict_arg(argvars, 1) == FAIL) return; ! dict = argvars[1].vval.v_dict; if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL) { // get signs placed at this line *************** *** 2640,2651 **** || check_for_opt_dict_arg(argvars, 4) == FAIL)) return; ! if (argvars[4].v_type != VAR_UNKNOWN ! && (argvars[4].v_type != VAR_DICT ! || ((dict = argvars[4].vval.v_dict) == NULL))) { ! emsg(_(e_dictionary_required)); ! return; } rettv->vval.v_number = sign_place_from_dict(&argvars[0], &argvars[1], --- 2634,2644 ---- || check_for_opt_dict_arg(argvars, 4) == FAIL)) return; ! if (argvars[4].v_type != VAR_UNKNOWN) { ! if (check_for_nonnull_dict_arg(argvars, 4) == FAIL) ! return; ! dict = argvars[4].vval.v_dict; } rettv->vval.v_number = sign_place_from_dict(&argvars[0], &argvars[1], *************** *** 2872,2882 **** if (argvars[1].v_type != VAR_UNKNOWN) { ! if (argvars[1].v_type != VAR_DICT) ! { ! emsg(_(e_dictionary_required)); return; - } dict = argvars[1].vval.v_dict; } --- 2865,2872 ---- if (argvars[1].v_type != VAR_UNKNOWN) { ! if (check_for_dict_arg(argvars, 1) == FAIL) return; dict = argvars[1].vval.v_dict; } *** ../vim-9.0.0334/src/terminal.c 2022-08-21 11:37:11.116916204 +0100 --- src/terminal.c 2022-08-30 19:12:09.091367576 +0100 *************** *** 4989,4999 **** { dict_T *d; ! if (argvars[2].v_type != VAR_DICT) ! { ! emsg(_(e_dictionary_required)); return; - } d = argvars[2].vval.v_dict; if (d != NULL) { --- 4989,4996 ---- { dict_T *d; ! if (check_for_dict_arg(argvars, 2) == FAIL) return; d = argvars[2].vval.v_dict; if (d != NULL) { *** ../vim-9.0.0334/src/textprop.c 2022-08-24 12:24:04.295387720 +0100 --- src/textprop.c 2022-08-30 19:12:09.095367574 +0100 *************** *** 149,159 **** start_lnum = tv_get_number(&argvars[0]); start_col = tv_get_number(&argvars[1]); ! if (argvars[2].v_type != VAR_DICT) ! { ! emsg(_(e_dictionary_required)); return; - } rettv->vval.v_number = prop_add_common(start_lnum, start_col, argvars[2].vval.v_dict, curbuf, &argvars[2]); --- 149,156 ---- start_lnum = tv_get_number(&argvars[0]); start_col = tv_get_number(&argvars[1]); ! if (check_for_dict_arg(argvars, 2) == FAIL) return; rettv->vval.v_number = prop_add_common(start_lnum, start_col, argvars[2].vval.v_dict, curbuf, &argvars[2]); *************** *** 1045,1055 **** || check_for_opt_string_arg(argvars, 1) == FAIL)) return; ! if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL) ! { ! emsg(_(e_dictionary_required)); return; - } dict = argvars[0].vval.v_dict; if (get_bufnr_from_arg(&argvars[0], &buf) == FAIL) --- 1042,1049 ---- || check_for_opt_string_arg(argvars, 1) == FAIL)) return; ! if (check_for_nonnull_dict_arg(argvars, 0) == FAIL) return; dict = argvars[0].vval.v_dict; if (get_bufnr_from_arg(&argvars[0], &buf) == FAIL) *************** *** 1396,1406 **** { dict_T *d; ! if (argvars[1].v_type != VAR_DICT) ! { ! emsg(_(e_dictionary_required)); return; - } d = argvars[1].vval.v_dict; if (get_bufnr_from_arg(&argvars[1], &buf) == FAIL) --- 1390,1397 ---- { dict_T *d; ! if (check_for_dict_arg(argvars, 1) == FAIL) return; d = argvars[1].vval.v_dict; if (get_bufnr_from_arg(&argvars[1], &buf) == FAIL) *************** *** 1499,1509 **** && check_for_opt_number_arg(argvars, 2) == FAIL))) return; ! if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL) ! { ! emsg(_(e_invalid_argument)); return; - } if (argvars[1].v_type != VAR_UNKNOWN) { --- 1490,1497 ---- && check_for_opt_number_arg(argvars, 2) == FAIL))) return; ! if (check_for_nonnull_dict_arg(argvars, 0) == FAIL) return; if (argvars[1].v_type != VAR_UNKNOWN) { *** ../vim-9.0.0334/src/time.c 2022-08-27 21:29:28.257402847 +0100 --- src/time.c 2022-08-30 19:12:09.095367574 +0100 *************** *** 872,883 **** msec = (long)tv_get_number(&argvars[0]); if (argvars[2].v_type != VAR_UNKNOWN) { ! if (argvars[2].v_type != VAR_DICT ! || (dict = argvars[2].vval.v_dict) == NULL) ! { ! semsg(_(e_invalid_argument_str), tv_get_string(&argvars[2])); return; ! } if (dict_has_key(dict, "repeat")) repeat = dict_get_number(dict, "repeat"); } --- 872,881 ---- msec = (long)tv_get_number(&argvars[0]); if (argvars[2].v_type != VAR_UNKNOWN) { ! if (check_for_nonnull_dict_arg(argvars, 2) == FAIL) return; ! ! dict = argvars[2].vval.v_dict; if (dict_has_key(dict, "repeat")) repeat = dict_get_number(dict, "repeat"); } *** ../vim-9.0.0334/src/typval.c 2022-07-29 15:28:24.019397903 +0100 --- src/typval.c 2022-08-30 19:12:09.095367574 +0100 *************** *** 533,538 **** --- 533,555 ---- } /* + * Give an error and return FAIL unless "args[idx]" is a non-NULL dict. + */ + int + check_for_nonnull_dict_arg(typval_T *args, int idx) + { + if (check_for_dict_arg(args, idx) == FAIL) + return FAIL; + + if (args[idx].vval.v_dict == NULL) + { + semsg(_(e_non_null_dict_required_for_argument_nr), idx + 1); + return FAIL; + } + return OK; + } + + /* * Check for an optional dict argument at 'idx' */ int *************** *** 1179,1185 **** if (type_is && tv1->v_type != tv2->v_type) { ! // For "is" a different type always means FALSE, for "notis" // it means TRUE. n1 = (type == EXPR_ISNOT); } --- 1196,1202 ---- if (type_is && tv1->v_type != tv2->v_type) { ! // For "is" a different type always means FALSE, for "isnot" // it means TRUE. n1 = (type == EXPR_ISNOT); } *** ../vim-9.0.0334/src/testdir/test_channel.vim 2022-08-29 22:31:15.919685279 +0100 --- src/testdir/test_channel.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 1509,1515 **** call assert_fails("let ch = ch_open('noserver')", 'E475:') echo ch let d = ch ! call assert_fails("let ch = ch_open('noserver', 10)", 'E474:') call assert_fails("let ch = ch_open('localhost:-1')", 'E475:') call assert_fails("let ch = ch_open('localhost:65537')", 'E475:') call assert_fails("let ch = ch_open('localhost:8765', {'timeout' : -1})", --- 1509,1515 ---- call assert_fails("let ch = ch_open('noserver')", 'E475:') echo ch let d = ch ! call assert_fails("let ch = ch_open('noserver', 10)", 'E1206:') call assert_fails("let ch = ch_open('localhost:-1')", 'E475:') call assert_fails("let ch = ch_open('localhost:65537')", 'E475:') call assert_fails("let ch = ch_open('localhost:8765', {'timeout' : -1})", *** ../vim-9.0.0334/src/testdir/test_charsearch.vim 2020-10-07 15:52:00.000000000 +0100 --- src/testdir/test_charsearch.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 39,45 **** call setcharsearch({'char' : ''}) call assert_equal('', getcharsearch().char) ! call assert_fails("call setcharsearch([])", 'E715:') enew! endfunc --- 39,45 ---- call setcharsearch({'char' : ''}) call assert_equal('', getcharsearch().char) ! call assert_fails("call setcharsearch([])", 'E1206:') enew! endfunc *** ../vim-9.0.0334/src/testdir/test_expr.vim 2022-07-30 15:43:56.222091886 +0100 --- src/testdir/test_expr.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 113,119 **** END call v9.CheckLegacyAndVim9Success(lines) ! call v9.CheckLegacyAndVim9Failure(["VAR i = has_key([], 'a')"], ['E715:', 'E1013:', 'E1206:']) endfunc func Test_strgetchar() --- 113,119 ---- END call v9.CheckLegacyAndVim9Success(lines) ! call v9.CheckLegacyAndVim9Failure(["VAR i = has_key([], 'a')"], ['E1206:', 'E1013:', 'E1206:']) endfunc func Test_strgetchar() *** ../vim-9.0.0334/src/testdir/test_functions.vim 2022-08-29 22:51:29.748546502 +0100 --- src/testdir/test_functions.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 2294,2300 **** endfunction let mydict = {'data': [0, 1, 2, 3], 'len': function("Mylen")} eval mydict.len->call([], mydict)->assert_equal(4) ! call assert_fails("call call('Mylen', [], 0)", 'E715:') call assert_fails('call foo', 'E107:') " These once caused a crash. --- 2294,2300 ---- endfunction let mydict = {'data': [0, 1, 2, 3], 'len': function("Mylen")} eval mydict.len->call([], mydict)->assert_equal(4) ! call assert_fails("call call('Mylen', [], 0)", 'E1206:') call assert_fails('call foo', 'E107:') " These once caused a crash. *** ../vim-9.0.0334/src/testdir/test_listdict.vim 2022-08-30 17:45:28.787606578 +0100 --- src/testdir/test_listdict.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 981,987 **** call assert_fails('call reverse("")', 'E899:') call assert_fails('call uniq([1, 2], {x, y -> []})', 'E745:') ! call assert_fails("call sort([1, 2], function('min'), 1)", "E715:") call assert_fails("call sort([1, 2], function('invalid_func'))", "E700:") call assert_fails("call sort([1, 2], function('min'))", "E118:") --- 981,987 ---- call assert_fails('call reverse("")', 'E899:') call assert_fails('call uniq([1, 2], {x, y -> []})', 'E745:') ! call assert_fails("call sort([1, 2], function('min'), 1)", "E1206:") call assert_fails("call sort([1, 2], function('invalid_func'))", "E700:") call assert_fails("call sort([1, 2], function('min'))", "E118:") *** ../vim-9.0.0334/src/testdir/test_map_functions.vim 2022-05-10 17:41:47.000000000 +0100 --- src/testdir/test_map_functions.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 273,279 **** bwipe! call assert_fails('call mapset([], v:false, {})', 'E730:') ! call assert_fails('call mapset("i", 0, "")', 'E715:') call assert_fails('call mapset("i", 0, {})', 'E460:') endfunc --- 273,279 ---- bwipe! call assert_fails('call mapset([], v:false, {})', 'E730:') ! call assert_fails('call mapset("i", 0, "")', 'E1206:') call assert_fails('call mapset("i", 0, {})', 'E460:') endfunc *** ../vim-9.0.0334/src/testdir/test_matchfuzzy.vim 2022-07-02 20:47:57.004693455 +0100 --- src/testdir/test_matchfuzzy.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 67,80 **** call assert_equal([{'id' : 6, 'val' : 'camera'}], matchfuzzy(l, 'cam', {'key' : 'val'})) call assert_equal([], matchfuzzy(l, 'day', {'text_cb' : {v -> v.val}})) call assert_equal([], matchfuzzy(l, 'day', {'key' : 'val'})) ! call assert_fails("let x = matchfuzzy(l, 'cam', 'random')", 'E715:') call assert_equal([], matchfuzzy(l, 'day', {'text_cb' : {v -> []}})) call assert_equal([], matchfuzzy(l, 'day', {'text_cb' : {v -> 1}})) call assert_fails("let x = matchfuzzy(l, 'day', {'text_cb' : {a, b -> 1}})", 'E119:') call assert_equal([], matchfuzzy(l, 'cam')) call assert_fails("let x = matchfuzzy(l, 'cam', {'text_cb' : []})", 'E921:') call assert_fails("let x = matchfuzzy(l, 'foo', {'key' : []})", 'E730:') ! call assert_fails("let x = matchfuzzy(l, 'cam', test_null_dict())", 'E715:') call assert_fails("let x = matchfuzzy(l, 'foo', {'key' : test_null_string()})", 'E475:') call assert_fails("let x = matchfuzzy(l, 'foo', {'text_cb' : test_null_function()})", 'E475:') " matches with same score should not be reordered --- 67,80 ---- call assert_equal([{'id' : 6, 'val' : 'camera'}], matchfuzzy(l, 'cam', {'key' : 'val'})) call assert_equal([], matchfuzzy(l, 'day', {'text_cb' : {v -> v.val}})) call assert_equal([], matchfuzzy(l, 'day', {'key' : 'val'})) ! call assert_fails("let x = matchfuzzy(l, 'cam', 'random')", 'E1206:') call assert_equal([], matchfuzzy(l, 'day', {'text_cb' : {v -> []}})) call assert_equal([], matchfuzzy(l, 'day', {'text_cb' : {v -> 1}})) call assert_fails("let x = matchfuzzy(l, 'day', {'text_cb' : {a, b -> 1}})", 'E119:') call assert_equal([], matchfuzzy(l, 'cam')) call assert_fails("let x = matchfuzzy(l, 'cam', {'text_cb' : []})", 'E921:') call assert_fails("let x = matchfuzzy(l, 'foo', {'key' : []})", 'E730:') ! call assert_fails("let x = matchfuzzy(l, 'cam', test_null_dict())", 'E1297:') call assert_fails("let x = matchfuzzy(l, 'foo', {'key' : test_null_string()})", 'E475:') call assert_fails("let x = matchfuzzy(l, 'foo', {'text_cb' : test_null_function()})", 'E475:') " matches with same score should not be reordered *************** *** 140,153 **** \ matchfuzzypos(l, 'cam', {'key' : 'val'})) call assert_equal([[], [], []], matchfuzzypos(l, 'day', {'text_cb' : {v -> v.val}})) call assert_equal([[], [], []], matchfuzzypos(l, 'day', {'key' : 'val'})) ! call assert_fails("let x = matchfuzzypos(l, 'cam', 'random')", 'E715:') call assert_equal([[], [], []], matchfuzzypos(l, 'day', {'text_cb' : {v -> []}})) call assert_equal([[], [], []], matchfuzzypos(l, 'day', {'text_cb' : {v -> 1}})) call assert_fails("let x = matchfuzzypos(l, 'day', {'text_cb' : {a, b -> 1}})", 'E119:') call assert_equal([[], [], []], matchfuzzypos(l, 'cam')) call assert_fails("let x = matchfuzzypos(l, 'cam', {'text_cb' : []})", 'E921:') call assert_fails("let x = matchfuzzypos(l, 'foo', {'key' : []})", 'E730:') ! call assert_fails("let x = matchfuzzypos(l, 'cam', test_null_dict())", 'E715:') call assert_fails("let x = matchfuzzypos(l, 'foo', {'key' : test_null_string()})", 'E475:') call assert_fails("let x = matchfuzzypos(l, 'foo', {'text_cb' : test_null_function()})", 'E475:') --- 140,153 ---- \ matchfuzzypos(l, 'cam', {'key' : 'val'})) call assert_equal([[], [], []], matchfuzzypos(l, 'day', {'text_cb' : {v -> v.val}})) call assert_equal([[], [], []], matchfuzzypos(l, 'day', {'key' : 'val'})) ! call assert_fails("let x = matchfuzzypos(l, 'cam', 'random')", 'E1206:') call assert_equal([[], [], []], matchfuzzypos(l, 'day', {'text_cb' : {v -> []}})) call assert_equal([[], [], []], matchfuzzypos(l, 'day', {'text_cb' : {v -> 1}})) call assert_fails("let x = matchfuzzypos(l, 'day', {'text_cb' : {a, b -> 1}})", 'E119:') call assert_equal([[], [], []], matchfuzzypos(l, 'cam')) call assert_fails("let x = matchfuzzypos(l, 'cam', {'text_cb' : []})", 'E921:') call assert_fails("let x = matchfuzzypos(l, 'foo', {'key' : []})", 'E730:') ! call assert_fails("let x = matchfuzzypos(l, 'cam', test_null_dict())", 'E1297:') call assert_fails("let x = matchfuzzypos(l, 'foo', {'key' : test_null_string()})", 'E475:') call assert_fails("let x = matchfuzzypos(l, 'foo', {'text_cb' : test_null_function()})", 'E475:') *** ../vim-9.0.0334/src/testdir/test_partial.vim 2020-08-12 17:43:41.000000000 +0100 --- src/testdir/test_partial.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 88,94 **** call assert_equal("Hello", dict.tr()) call assert_fails("let F=function('setloclist', 10)", "E923:") ! call assert_fails("let F=function('setloclist', [], [])", "E922:") endfunc func Test_partial_implicit() --- 88,94 ---- call assert_equal("Hello", dict.tr()) call assert_fails("let F=function('setloclist', 10)", "E923:") ! call assert_fails("let F=function('setloclist', [], [])", "E1206:") endfunc func Test_partial_implicit() *** ../vim-9.0.0334/src/testdir/test_popupwin.vim 2022-05-30 17:45:49.000000000 +0100 --- src/testdir/test_popupwin.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 1035,1041 **** func Test_popup_invalid_arguments() call assert_fails('call popup_create(666, {})', 'E86:') call popup_clear() ! call assert_fails('call popup_create("text", "none")', 'E715:') call popup_clear() call assert_fails('call popup_create(test_null_string(), {})', 'E450:') call assert_fails('call popup_create(test_null_list(), {})', 'E450:') --- 1035,1041 ---- func Test_popup_invalid_arguments() call assert_fails('call popup_create(666, {})', 'E86:') call popup_clear() ! call assert_fails('call popup_create("text", "none")', 'E1206:') call popup_clear() call assert_fails('call popup_create(test_null_string(), {})', 'E450:') call assert_fails('call popup_create(test_null_list(), {})', 'E450:') *************** *** 1309,1316 **** let line = join(map(range(1, 6), 'screenstring(1, v:val)'), '') call assert_equal('hworld', line) ! call assert_fails('call popup_move(winid, [])', 'E715:') ! call assert_fails('call popup_move(winid, test_null_dict())', 'E715:') call popup_close(winid) --- 1309,1316 ---- let line = join(map(range(1, 6), 'screenstring(1, v:val)'), '') call assert_equal('hworld', line) ! call assert_fails('call popup_move(winid, [])', 'E1206:') ! call assert_fails('call popup_move(winid, test_null_dict())', 'E1297:') call popup_close(winid) *************** *** 2577,2584 **** call assert_equal(1, options.drag) call assert_equal('Another', options.highlight) ! call assert_fails('call popup_setoptions(winid, [])', 'E715:') ! call assert_fails('call popup_setoptions(winid, test_null_dict())', 'E715:') call popup_close(winid) call assert_equal(0, popup_setoptions(winid, options.wrap)) --- 2577,2584 ---- call assert_equal(1, options.drag) call assert_equal('Another', options.highlight) ! call assert_fails('call popup_setoptions(winid, [])', 'E1206:') ! call assert_fails('call popup_setoptions(winid, test_null_dict())', 'E1297:') call popup_close(winid) call assert_equal(0, popup_setoptions(winid, options.wrap)) *** ../vim-9.0.0334/src/testdir/test_search_stat.vim 2022-02-14 12:43:31.000000000 +0000 --- src/testdir/test_search_stat.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 259,265 **** endfunc func Test_searchcount_fails() ! call assert_fails('echo searchcount("boo!")', 'E715:') call assert_fails('echo searchcount({"timeout" : []})', 'E745:') call assert_fails('echo searchcount({"maxcount" : []})', 'E745:') call assert_fails('echo searchcount({"pattern" : []})', 'E730:') --- 259,265 ---- endfunc func Test_searchcount_fails() ! call assert_fails('echo searchcount("boo!")', 'E1206:') call assert_fails('echo searchcount({"timeout" : []})', 'E745:') call assert_fails('echo searchcount({"maxcount" : []})', 'E745:') call assert_fails('echo searchcount({"pattern" : []})', 'E730:') *** ../vim-9.0.0334/src/testdir/test_signs.vim 2021-12-22 19:38:40.000000000 +0000 --- src/testdir/test_signs.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 449,455 **** call assert_fails('call sign_define("sign4", {"text" : "===>"})', 'E239:') call assert_fails('call sign_define("sign5", {"text" : ""})', 'E239:') call assert_fails('call sign_define({})', 'E731:') ! call assert_fails('call sign_define("sign6", [])', 'E715:') " Tests for sign_getdefined() call assert_equal([], sign_getdefined("none")) --- 449,455 ---- call assert_fails('call sign_define("sign4", {"text" : "===>"})', 'E239:') call assert_fails('call sign_define("sign5", {"text" : ""})', 'E239:') call assert_fails('call sign_define({})', 'E731:') ! call assert_fails('call sign_define("sign6", [])', 'E1206:') " Tests for sign_getdefined() call assert_equal([], sign_getdefined("none")) *************** *** 476,483 **** " Tests for invalid arguments to sign_place() call assert_fails('call sign_place([], "", "mySign", 1)', 'E745:') call assert_fails('call sign_place(5, "", "mySign", -1)', 'E158:') ! call assert_fails('call sign_place(-1, "", "sign1", "Xsign", [])', ! \ 'E715:') call assert_fails('call sign_place(-1, "", "sign1", "Xsign", \ {"lnum" : 30})', 'E474:') call assert_fails('call sign_place(10, "", "xsign1x", "Xsign", --- 476,482 ---- " Tests for invalid arguments to sign_place() call assert_fails('call sign_place([], "", "mySign", 1)', 'E745:') call assert_fails('call sign_place(5, "", "mySign", -1)', 'E158:') ! call assert_fails('call sign_place(-1, "", "sign1", "Xsign", [])', 'E1206:') call assert_fails('call sign_place(-1, "", "sign1", "Xsign", \ {"lnum" : 30})', 'E474:') call assert_fails('call sign_place(10, "", "xsign1x", "Xsign", *************** *** 512,518 **** call assert_fails("call sign_getplaced('dummy.sign')", 'E158:') call assert_fails('call sign_getplaced("&")', 'E158:') call assert_fails('call sign_getplaced(-1)', 'E158:') ! call assert_fails('call sign_getplaced("Xsign", [])', 'E715:') call assert_equal([{'bufnr' : bufnr(''), 'signs' : []}], \ sign_getplaced('Xsign', {'lnum' : 1000000})) call assert_fails("call sign_getplaced('Xsign', {'lnum' : []})", --- 511,517 ---- call assert_fails("call sign_getplaced('dummy.sign')", 'E158:') call assert_fails('call sign_getplaced("&")', 'E158:') call assert_fails('call sign_getplaced(-1)', 'E158:') ! call assert_fails('call sign_getplaced("Xsign", [])', 'E1206:') call assert_equal([{'bufnr' : bufnr(''), 'signs' : []}], \ sign_getplaced('Xsign', {'lnum' : 1000000})) call assert_fails("call sign_getplaced('Xsign', {'lnum' : []})", *************** *** 535,541 **** \ {'id' : 20, 'buffer' : '&'})", 'E158:') call assert_fails("call sign_unplace('g1', \ {'id' : 20, 'buffer' : 200})", 'E158:') ! call assert_fails("call sign_unplace('g1', 'mySign')", 'E715:') call sign_unplace('*') --- 534,540 ---- \ {'id' : 20, 'buffer' : '&'})", 'E158:') call assert_fails("call sign_unplace('g1', \ {'id' : 20, 'buffer' : 200})", 'E158:') ! call assert_fails("call sign_unplace('g1', 'mySign')", 'E1206:') call sign_unplace('*') *************** *** 1554,1561 **** \ s[0].signs) " Error case ! call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign', ! \ [])", 'E715:') call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign', \ {'priority' : []})", 'E745:') call sign_unplace('*') --- 1553,1559 ---- \ s[0].signs) " Error case ! call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign', [])", 'E1206:') call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign', \ {'priority' : []})", 'E745:') call sign_unplace('*') *** ../vim-9.0.0334/src/testdir/test_tagjump.vim 2022-06-01 15:10:57.000000000 +0100 --- src/testdir/test_tagjump.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 403,409 **** " Error cases call assert_equal({}, gettagstack(100)) call assert_equal(-1, settagstack(100, {'items' : []})) ! call assert_fails('call settagstack(1, [1, 10])', 'E715:') call assert_fails("call settagstack(1, {'items' : 10})", 'E714:') call assert_fails("call settagstack(1, {'items' : []}, 10)", 'E928:') call assert_fails("call settagstack(1, {'items' : []}, 'b')", 'E962:') --- 403,409 ---- " Error cases call assert_equal({}, gettagstack(100)) call assert_equal(-1, settagstack(100, {'items' : []})) ! call assert_fails('call settagstack(1, [1, 10])', 'E1206:') call assert_fails("call settagstack(1, {'items' : 10})", 'E714:') call assert_fails("call settagstack(1, {'items' : []}, 10)", 'E928:') call assert_fails("call settagstack(1, {'items' : []}, 'b')", 'E962:') *** ../vim-9.0.0334/src/testdir/test_terminal.vim 2022-08-29 22:31:15.923685244 +0100 --- src/testdir/test_terminal.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 1453,1459 **** call assert_fails("call term_dumpwrite({}, 'Xtest.dump')", 'E728:') let buf = RunVimInTerminal('', {}) call TermWait(buf) ! call assert_fails("call term_dumpwrite(buf, 'Xtest.dump', '')", 'E715:') call assert_fails("call term_dumpwrite(buf, [])", 'E730:') call writefile([], 'Xtest.dump') call assert_fails("call term_dumpwrite(buf, 'Xtest.dump')", 'E953:') --- 1453,1459 ---- call assert_fails("call term_dumpwrite({}, 'Xtest.dump')", 'E728:') let buf = RunVimInTerminal('', {}) call TermWait(buf) ! call assert_fails("call term_dumpwrite(buf, 'Xtest.dump', '')", 'E1206:') call assert_fails("call term_dumpwrite(buf, [])", 'E730:') call writefile([], 'Xtest.dump') call assert_fails("call term_dumpwrite(buf, 'Xtest.dump')", 'E953:') *** ../vim-9.0.0334/src/testdir/test_textprop.vim 2022-08-28 16:38:57.408641746 +0100 --- src/testdir/test_textprop.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 1679,1692 **** func Test_prop_func_invalid_args() call assert_fails('call prop_clear(1, 2, [])', 'E715:') call assert_fails('call prop_clear(-1, 2)', 'E16:') ! call assert_fails('call prop_find(test_null_dict())', 'E715:') call assert_fails('call prop_find({"bufnr" : []})', 'E730:') call assert_fails('call prop_find({})', 'E968:') call assert_fails('call prop_find({}, "x")', 'E474:') call assert_fails('call prop_find({"lnum" : -2})', 'E16:') ! call assert_fails('call prop_list(1, [])', 'E715:') call assert_fails('call prop_list(-1, {})', 'E16:') ! call assert_fails('call prop_remove([])', 'E474:') call assert_fails('call prop_remove({}, -2)', 'E16:') call assert_fails('call prop_remove({})', 'E968:') call assert_fails('call prop_type_add([], {})', 'E730:') --- 1679,1692 ---- func Test_prop_func_invalid_args() call assert_fails('call prop_clear(1, 2, [])', 'E715:') call assert_fails('call prop_clear(-1, 2)', 'E16:') ! call assert_fails('call prop_find(test_null_dict())', 'E1297:') call assert_fails('call prop_find({"bufnr" : []})', 'E730:') call assert_fails('call prop_find({})', 'E968:') call assert_fails('call prop_find({}, "x")', 'E474:') call assert_fails('call prop_find({"lnum" : -2})', 'E16:') ! call assert_fails('call prop_list(1, [])', 'E1206:') call assert_fails('call prop_list(-1, {})', 'E16:') ! call assert_fails('call prop_remove([])', 'E1206:') call assert_fails('call prop_remove({}, -2)', 'E16:') call assert_fails('call prop_remove({})', 'E968:') call assert_fails('call prop_type_add([], {})', 'E730:') *************** *** 1699,1705 **** call assert_fails("call prop_type_add('yyy', 'not_a_dict')", 'E715:') call assert_fails("call prop_add(1, 5, {'type':'missing_type', 'length':1})", 'E971:') call assert_fails("call prop_add(1, 5, {'type': ''})", 'E971:') ! call assert_fails('call prop_add(1, 1, 0)', 'E715:') new call setline(1, ['first', 'second']) --- 1699,1705 ---- call assert_fails("call prop_type_add('yyy', 'not_a_dict')", 'E715:') call assert_fails("call prop_add(1, 5, {'type':'missing_type', 'length':1})", 'E971:') call assert_fails("call prop_add(1, 5, {'type': ''})", 'E971:') ! call assert_fails('call prop_add(1, 1, 0)', 'E1206:') new call setline(1, ['first', 'second']) *** ../vim-9.0.0334/src/testdir/test_timers.vim 2022-07-23 06:24:56.409106034 +0100 --- src/testdir/test_timers.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 265,271 **** sleep 50m call assert_equal(3, g:call_count) ! call assert_fails('call timer_start(100, "MyHandler", "abc")', 'E475:') call assert_fails('call timer_start(100, [])', 'E921:') call assert_fails('call timer_stop("abc")', 'E39:') endfunc --- 265,271 ---- sleep 50m call assert_equal(3, g:call_count) ! call assert_fails('call timer_start(100, "MyHandler", "abc")', 'E1206:') call assert_fails('call timer_start(100, [])', 'E921:') call assert_fails('call timer_stop("abc")', 'E39:') endfunc *** ../vim-9.0.0334/src/testdir/test_window_cmd.vim 2022-08-10 17:23:08.983907034 +0100 --- src/testdir/test_window_cmd.vim 2022-08-30 19:12:09.091367576 +0100 *************** *** 745,751 **** only! bwipe! ! call assert_fails('call winrestview(test_null_dict())', 'E474:') endfunc func Test_relative_cursor_position_after_move_and_resize() --- 745,751 ---- only! bwipe! ! call assert_fails('call winrestview(test_null_dict())', 'E1297:') endfunc func Test_relative_cursor_position_after_move_and_resize() *************** *** 946,952 **** call assert_equal(view, winsaveview()) bwipe! ! call assert_fails('call winrestview(test_null_dict())', 'E474:') endfunc func Test_win_splitmove() --- 946,952 ---- call assert_equal(view, winsaveview()) bwipe! ! call assert_fails('call winrestview(test_null_dict())', 'E1297:') endfunc func Test_win_splitmove() *************** *** 977,983 **** call assert_equal(bufname(winbufnr(2)), 'b') call assert_equal(bufname(winbufnr(3)), 'a') call assert_equal(bufname(winbufnr(4)), 'd') ! call assert_fails('call win_splitmove(winnr(), winnr("k"), test_null_dict())', 'E474:') only | bd call assert_fails('call win_splitmove(winnr(), 123)', 'E957:') --- 977,983 ---- call assert_equal(bufname(winbufnr(2)), 'b') call assert_equal(bufname(winbufnr(3)), 'a') call assert_equal(bufname(winbufnr(4)), 'd') ! call assert_fails('call win_splitmove(winnr(), winnr("k"), test_null_dict())', 'E1297:') only | bd call assert_fails('call win_splitmove(winnr(), 123)', 'E957:') *** ../vim-9.0.0334/src/version.c 2022-08-30 18:42:13.170331381 +0100 --- src/version.c 2022-08-30 19:13:20.399325135 +0100 *************** *** 709,710 **** --- 709,712 ---- { /* Add new patch number below this line */ + /**/ + 335, /**/ -- CART DRIVER: Bring out your dead! LARGE MAN: Here's one! CART DRIVER: Ninepence. BODY: I'm not dead! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///