To: vim_dev@googlegroups.com Subject: Patch 9.0.1479 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1479 Problem: Small source file problems; outdated list of distributed files. Solution: Small updates to source files and list of distributed files. Files: Filelist, ci/load-snd-dummy.sh, src/beval.c, src/cmdexpand.c, src/ex_cmds.c, src/getchar.c, src/gui_beval.c, src/insexpand.c, src/job.c, src/menu.c, src/terminal.c, src/vim9compile.c, src/window.c, src/testdir/Makefile *** ../vim-9.0.1478/Filelist 2022-12-08 10:03:44.941812028 +0000 --- Filelist 2023-04-22 22:45:01.334315737 +0100 *************** *** 18,27 **** .appveyor.yml \ .codecov.yml \ ci/appveyor.bat \ - ci/build-snd-dummy.sh \ ci/config.mk*.sed \ ci/if_ver*.vim \ - ci/load-snd-dummy.sh \ ci/setup-xvfb.sh \ src/Make_all.mak \ src/README.md \ --- 18,25 ---- *************** *** 710,715 **** --- 708,714 ---- runtime/ftoff.vim \ runtime/gvimrc_example.vim \ runtime/import/dist/vimhelp.vim \ + runtime/import/dist/vimhighlight.vim \ runtime/macros/README.txt \ runtime/macros/editexisting.vim \ runtime/macros/hanoi/click.me \ *** ../vim-9.0.1478/ci/load-snd-dummy.sh 2020-08-19 18:43:53.000000000 +0100 --- ci/load-snd-dummy.sh 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,8 **** - #!/bin/bash - set -e - - if ! modprobe snd-dummy; then - # snd-dummy is contained in linux-modules-extra (if exists) - apt-get install -yq --no-install-suggests --no-install-recommends "linux-modules-extra-$(uname -r)" - modprobe snd-dummy - fi --- 0 ---- *** ../vim-9.0.1478/src/beval.c 2022-10-01 19:43:48.602494034 +0100 --- src/beval.c 2023-03-10 21:06:46.399995175 +0000 *************** *** 261,267 **** save_curbuf = curbuf; curbuf = wp->w_buffer; use_sandbox = was_set_insecurely((char_u *)"balloonexpr", ! *curbuf->b_p_bexpr == NUL ? 0 : OPT_LOCAL); curbuf = save_curbuf; if (use_sandbox) ++sandbox; --- 261,267 ---- save_curbuf = curbuf; curbuf = wp->w_buffer; use_sandbox = was_set_insecurely((char_u *)"balloonexpr", ! *curbuf->b_p_bexpr == NUL ? 0 : OPT_LOCAL); curbuf = save_curbuf; if (use_sandbox) ++sandbox; *** ../vim-9.0.1478/src/cmdexpand.c 2023-01-25 15:04:17.939549253 +0000 --- src/cmdexpand.c 2023-04-12 16:10:43.409763662 +0100 *************** *** 1484,1491 **** * EXPAND_FILES After command with EX_XFILE set, or after setting * with P_EXPAND set. eg :e ^I, :w>>^I * EXPAND_DIRECTORIES In some cases this is used instead of the latter ! * when we know only directories are of interest. eg ! * :set dir=^I * EXPAND_SHELLCMD After ":!cmd", ":r !cmd" or ":w !cmd". * EXPAND_SETTINGS Complete variable names. eg :set d^I * EXPAND_BOOL_SETTINGS Complete boolean variables only, eg :set no^I --- 1484,1491 ---- * EXPAND_FILES After command with EX_XFILE set, or after setting * with P_EXPAND set. eg :e ^I, :w>>^I * EXPAND_DIRECTORIES In some cases this is used instead of the latter ! * when we know only directories are of interest. ! * E.g. :set dir=^I and :cd ^I * EXPAND_SHELLCMD After ":!cmd", ":r !cmd" or ":w !cmd". * EXPAND_SETTINGS Complete variable names. eg :set d^I * EXPAND_BOOL_SETTINGS Complete boolean variables only, eg :set no^I *** ../vim-9.0.1478/src/ex_cmds.c 2023-03-04 20:47:32.300617854 +0000 --- src/ex_cmds.c 2023-04-20 17:56:22.911448381 +0100 *************** *** 5107,5113 **** *cmd++ = NUL; // replace it with a NUL } ! if (search_regcomp(pat, &used_pat, RE_BOTH, which_pat, SEARCH_HIS, ®match) == FAIL) { emsg(_(e_invalid_command)); return; --- 5107,5114 ---- *cmd++ = NUL; // replace it with a NUL } ! if (search_regcomp(pat, &used_pat, RE_BOTH, which_pat, SEARCH_HIS, ! ®match) == FAIL) { emsg(_(e_invalid_command)); return; *** ../vim-9.0.1478/src/getchar.c 2023-03-18 17:22:42.518645582 +0000 --- src/getchar.c 2023-03-26 20:36:55.061108120 +0100 *************** *** 133,139 **** for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next) count += (long_u)STRLEN(bp->b_str); ! if ((count || dozero) && (p = alloc(count + 1)) != NULL) { p2 = p; for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next) --- 133,139 ---- for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next) count += (long_u)STRLEN(bp->b_str); ! if ((count > 0 || dozero) && (p = alloc(count + 1)) != NULL) { p2 = p; for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next) *************** *** 141,147 **** *p2++ = *str++; *p2 = NUL; } ! return (p); } /* --- 141,147 ---- *p2++ = *str++; *p2 = NUL; } ! return p; } /* *** ../vim-9.0.1478/src/gui_beval.c 2023-01-22 21:14:32.613863616 +0000 --- src/gui_beval.c 2023-03-10 21:02:52.355933773 +0000 *************** *** 404,411 **** } else { ! beval->timerID = g_timeout_add((guint)p_bdlay, ! &timeout_cb, beval); } } } --- 404,410 ---- } else { ! beval->timerID = g_timeout_add((guint)p_bdlay, &timeout_cb, beval); } } } *** ../vim-9.0.1478/src/insexpand.c 2023-03-02 17:51:29.524736925 +0000 --- src/insexpand.c 2023-04-16 18:34:45.016431273 +0100 *************** *** 3001,3007 **** if (compl_dir_forward()) { ! // search backwards for the first valid (!= -1) number. // This should normally succeed already at the first loop // cycle, so it's fast! for (match = compl_curr_match->cp_prev; match != NULL --- 3001,3007 ---- if (compl_dir_forward()) { ! // Search backwards for the first valid (!= -1) number. // This should normally succeed already at the first loop // cycle, so it's fast! for (match = compl_curr_match->cp_prev; match != NULL *************** *** 3012,3019 **** break; } if (match != NULL) ! // go up and assign all numbers which are not assigned ! // yet for (match = match->cp_next; match != NULL && match->cp_number == -1; match = match->cp_next) --- 3012,3018 ---- break; } if (match != NULL) ! // go up and assign all numbers which are not assigned yet for (match = match->cp_next; match != NULL && match->cp_number == -1; match = match->cp_next) *************** *** 3021,3027 **** } else // BACKWARD { ! // search forwards (upwards) for the first valid (!= -1) // number. This should normally succeed already at the // first loop cycle, so it's fast! for (match = compl_curr_match->cp_next; match != NULL --- 3020,3026 ---- } else // BACKWARD { ! // Search forwards (upwards) for the first valid (!= -1) // number. This should normally succeed already at the // first loop cycle, so it's fast! for (match = compl_curr_match->cp_next; match != NULL *************** *** 3032,3039 **** break; } if (match != NULL) ! // go down and assign all numbers which are not ! // assigned yet for (match = match->cp_prev; match && match->cp_number == -1; match = match->cp_prev) --- 3031,3037 ---- break; } if (match != NULL) ! // go down and assign all numbers which are not assigned yet for (match = match->cp_prev; match && match->cp_number == -1; match = match->cp_prev) *** ../vim-9.0.1478/src/job.c 2023-03-07 17:13:47.309107774 +0000 --- src/job.c 2023-03-27 21:18:24.652059436 +0100 *************** *** 383,389 **** val = tv_get_string(item); if (STRCMP(val, "open") != 0 && STRCMP(val, "close") != 0) { ! semsg(_(e_invalid_value_for_argument_str_str), "term_finish", val); return FAIL; } opt->jo_set2 |= JO2_TERM_FINISH; --- 383,390 ---- val = tv_get_string(item); if (STRCMP(val, "open") != 0 && STRCMP(val, "close") != 0) { ! semsg(_(e_invalid_value_for_argument_str_str), ! "term_finish", val); return FAIL; } opt->jo_set2 |= JO2_TERM_FINISH; *** ../vim-9.0.1478/src/menu.c 2023-01-14 12:32:24.219984103 +0000 --- src/menu.c 2023-03-12 20:01:21.690418937 +0000 *************** *** 2318,2325 **** /* * Execute "menu". Use by ":emenu" and the window toolbar. * "eap" is NULL for the window toolbar. ! * "mode_idx" specifies a MENU_INDEX_ value, use -1 to depend on the current ! * state. */ void execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx) --- 2318,2325 ---- /* * Execute "menu". Use by ":emenu" and the window toolbar. * "eap" is NULL for the window toolbar. ! * "mode_idx" specifies a MENU_INDEX_ value, use MENU_INDEX_INVALID to depend ! * on the current state. */ void execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx) *************** *** 2329,2335 **** if (idx < 0) { // Use the Insert mode entry when returning to Insert mode. ! if (restart_edit && !current_sctx.sc_sid) { idx = MENU_INDEX_INSERT; } --- 2329,2335 ---- if (idx < 0) { // Use the Insert mode entry when returning to Insert mode. ! if (restart_edit && current_sctx.sc_sid == 0) { idx = MENU_INDEX_INSERT; } *************** *** 2513,2519 **** { vimmenu_T *menu; char_u *arg = eap->arg; ! int mode_idx = -1; if (arg[0] && VIM_ISWHITE(arg[1])) { --- 2513,2519 ---- { vimmenu_T *menu; char_u *arg = eap->arg; ! int mode_idx = MENU_INDEX_INVALID; if (arg[0] && VIM_ISWHITE(arg[1])) { *** ../vim-9.0.1478/src/terminal.c 2023-02-21 14:27:34.524360386 +0000 --- src/terminal.c 2023-04-12 11:28:47.170113941 +0100 *************** *** 3310,3316 **** } /* ! * If the number of lines that are stored goes over 'termscrollback' then * delete the first 10%. * "gap" points to tl_scrollback or tl_scrollback_postponed. * "update_buffer" is TRUE when the buffer should be updated. --- 3310,3316 ---- } /* ! * If the number of lines that are stored goes over 'termwinscroll' then * delete the first 10%. * "gap" points to tl_scrollback or tl_scrollback_postponed. * "update_buffer" is TRUE when the buffer should be updated. *** ../vim-9.0.1478/src/vim9compile.c 2023-02-22 12:35:13.874234570 +0000 --- src/vim9compile.c 2023-03-11 22:55:59.806976359 +0000 *************** *** 2646,2652 **** lhs_type = &t_number; if (*p != '=' && need_type(rhs_type, lhs_type, FALSE, -1, 0, cctx, FALSE, FALSE) == FAIL) ! goto theend; } } else if (cmdidx == CMD_final) --- 2646,2652 ---- lhs_type = &t_number; if (*p != '=' && need_type(rhs_type, lhs_type, FALSE, -1, 0, cctx, FALSE, FALSE) == FAIL) ! goto theend; } } else if (cmdidx == CMD_final) *** ../vim-9.0.1478/src/window.c 2023-04-02 22:05:09.786319296 +0100 --- src/window.c 2023-04-15 11:44:29.590818921 +0100 *************** *** 4633,4639 **** leave_tabpage( buf_T *new_curbuf UNUSED, // what is going to be the new curbuf, // NULL if unknown ! int trigger_leave_autocmds UNUSED) { tabpage_T *tp = curtab; --- 4633,4639 ---- leave_tabpage( buf_T *new_curbuf UNUSED, // what is going to be the new curbuf, // NULL if unknown ! int trigger_leave_autocmds) { tabpage_T *tp = curtab; *** ../vim-9.0.1478/src/testdir/Makefile 2022-09-23 19:42:27.814236815 +0100 --- src/testdir/Makefile 2023-04-22 22:52:07.618174723 +0100 *************** *** 18,24 **** # The output goes into a file "valgrind.testN" # Vim should be compiled with EXITFREE to avoid false warnings. # This will make testing about 10 times as slow. ! # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=35 --log-file=valgrind.$* # To execute one test, e.g. in gdb, use something like this: # run -f -u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S runtest.vim test_name.vim --- 18,24 ---- # The output goes into a file "valgrind.testN" # Vim should be compiled with EXITFREE to avoid false warnings. # This will make testing about 10 times as slow. ! # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=45 --log-file=valgrind.$* # To execute one test, e.g. in gdb, use something like this: # run -f -u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S runtest.vim test_name.vim *** ../vim-9.0.1478/src/version.c 2023-04-22 21:38:43.154215972 +0100 --- src/version.c 2023-04-22 22:52:34.194097241 +0100 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1479, /**/ -- Communication is one of the most compli..., eh, well, it's hard. You know what I mean. Not? /// 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 ///