]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1479: small source file problems; outdated list of distrib. files v9.0.1479
authorBram Moolenaar <Bram@vim.org>
Sat, 22 Apr 2023 21:54:40 +0000 (22:54 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 22 Apr 2023 21:54:40 +0000 (22:54 +0100)
Problem:    Small source file problems; outdated list of distributed files.
Solution:   Small updates to source files and list of distributed files.

15 files changed:
Filelist
ci/load-snd-dummy.sh [deleted file]
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/testdir/Makefile
src/version.c
src/vim9compile.c
src/window.c

index b8b9ba0a5014516c44e8a99e75d2bd6bcd923902..392ef809d855a885da2db452d4d28db8e6983120 100644 (file)
--- a/Filelist
+++ b/Filelist
@@ -18,10 +18,8 @@ SRC_ALL =    \
                .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 \
@@ -710,6 +708,7 @@ RT_ALL =    \
                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 \
diff --git a/ci/load-snd-dummy.sh b/ci/load-snd-dummy.sh
deleted file mode 100644 (file)
index b0101b0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/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
index 375795e4afb1c5b112156dad11dc405a111aeb8c..cd918638372099ddaf2f88490f2410493e7bee43 100644 (file)
@@ -261,7 +261,7 @@ bexpr_eval(
     save_curbuf = curbuf;
     curbuf = wp->w_buffer;
     use_sandbox = was_set_insecurely((char_u *)"balloonexpr",
-           *curbuf->b_p_bexpr == NUL ? 0 : OPT_LOCAL);
+                                   *curbuf->b_p_bexpr == NUL ? 0 : OPT_LOCAL);
     curbuf = save_curbuf;
     if (use_sandbox)
        ++sandbox;
index 23661578037d99e27d630270ab57bded831c6aec..b5a7a3eb29feb273a7b3f4b96f6170a0d13092af 100644 (file)
@@ -1484,8 +1484,8 @@ addstar(
  *  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
+ *                         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
index 3ccb29ab371f0b5394fdccc5eac513d228a117dd..085467e5830efa15c44f4a636b2e269cc24a6bc0 100644 (file)
@@ -5107,7 +5107,8 @@ ex_global(exarg_T *eap)
            *cmd++ = NUL;                   // replace it with a NUL
     }
 
-    if (search_regcomp(pat, &used_pat, RE_BOTH, which_pat, SEARCH_HIS, &regmatch) == FAIL)
+    if (search_regcomp(pat, &used_pat, RE_BOTH, which_pat, SEARCH_HIS,
+                                                           &regmatch) == FAIL)
     {
        emsg(_(e_invalid_command));
        return;
index 125f0b0aadf37e59f2ac5d52d205546944d61977..6817fa5b83590effdaa62a75697b9d90a8c394f7 100644 (file)
@@ -133,7 +133,7 @@ get_buffcont(
     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)
+    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,7 +141,7 @@ get_buffcont(
                *p2++ = *str++;
        *p2 = NUL;
     }
-    return (p);
+    return p;
 }
 
 /*
index 9d85d90e0056388d44aa9525a0f5ce7e3d491e9a..bbfa2ba7aa9f573d499942ab4f3ac81f811521c8 100644 (file)
@@ -404,8 +404,7 @@ pointer_event(BalloonEval *beval, int x, int y, unsigned state)
        }
        else
        {
-           beval->timerID = g_timeout_add((guint)p_bdlay,
-                   &timeout_cb, beval);
+           beval->timerID = g_timeout_add((guint)p_bdlay, &timeout_cb, beval);
        }
     }
 }
index 2737f2b51f182e8b3dc0f08e1421854e83c600b1..c20cb4f258b264cd9872a1b5a23fb683262bf7a2 100644 (file)
@@ -3001,7 +3001,7 @@ ins_compl_update_sequence_numbers(void)
 
     if (compl_dir_forward())
     {
-       // search backwards for the first valid (!= -1) number.
+       // 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,8 +3012,7 @@ ins_compl_update_sequence_numbers(void)
                break;
            }
        if (match != NULL)
-           // go up and assign all numbers which are not assigned
-           // yet
+           // 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,7 +3020,7 @@ ins_compl_update_sequence_numbers(void)
     }
     else // BACKWARD
     {
-       // search forwards (upwards) for the first valid (!= -1)
+       // 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,8 +3031,7 @@ ins_compl_update_sequence_numbers(void)
                break;
            }
        if (match != NULL)
-           // go down and assign all numbers which are not
-           // assigned yet
+           // 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)
index 1d18abb9254c6c50e1c2dd4e3863d46d2011c190..4e64ca3c789c92f19b480be461a9d711088f4adc 100644 (file)
--- a/src/job.c
+++ b/src/job.c
@@ -383,7 +383,8 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
                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);
+                   semsg(_(e_invalid_value_for_argument_str_str),
+                                                          "term_finish", val);
                    return FAIL;
                }
                opt->jo_set2 |= JO2_TERM_FINISH;
index a543a5093e44bb01f28cbcfc4b3ebf39438af578..04cd5f103c5ef7a92d9dd4372c25a467f0bb085d 100644 (file)
@@ -2318,8 +2318,8 @@ gui_destroy_tearoffs_recurse(vimmenu_T *menu)
 /*
  * 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.
+ * "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,7 +2329,7 @@ execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx)
     if (idx < 0)
     {
        // Use the Insert mode entry when returning to Insert mode.
-       if (restart_edit && !current_sctx.sc_sid)
+       if (restart_edit && current_sctx.sc_sid == 0)
        {
            idx = MENU_INDEX_INSERT;
        }
@@ -2513,7 +2513,7 @@ ex_emenu(exarg_T *eap)
 {
     vimmenu_T  *menu;
     char_u     *arg = eap->arg;
-    int                mode_idx = -1;
+    int                mode_idx = MENU_INDEX_INVALID;
 
     if (arg[0] && VIM_ISWHITE(arg[1]))
     {
index 997f83aef4e36c579c50ad6a3ffd997a30ce9697..71602da928f8598daa18b3616eb22a1898d4c02d 100644 (file)
@@ -3310,7 +3310,7 @@ handle_resize(int rows, int cols, void *user)
 }
 
 /*
- * If the number of lines that are stored goes over 'termscrollback' then
+ * 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.
index b69d935538d74dd0e64db466a8573e41cf65ef05..fd2e56c197050cd90e343ec593a6da48968e507c 100644 (file)
@@ -18,7 +18,7 @@ REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C L
 #   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.$*
+# 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
index 0df443603f1251a22f4c6f6bb9caa142be42f641..b8cc4d99bd2a7f026fce9445354c68f4e4a2dcfc 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1479,
 /**/
     1478,
 /**/
index 64526aa9d3ea01d8dafcf5fa11b6ac1f6248146c..e689c55cfd6230fe5238493da4455714ba9e4786 100644 (file)
@@ -2646,7 +2646,7 @@ compile_assignment(
                        lhs_type = &t_number;
                    if (*p != '=' && need_type(rhs_type, lhs_type, FALSE,
                                            -1, 0, cctx, FALSE, FALSE) == FAIL)
-                   goto theend;
+                       goto theend;
                }
            }
            else if (cmdidx == CMD_final)
index 3405285c05791b92eb1da6a912af1995d64ffbe2..6b86825a440c2145b032a641182c01b1018c4b12 100644 (file)
@@ -4633,7 +4633,7 @@ tabpage_index(tabpage_T *ftp)
 leave_tabpage(
     buf_T      *new_curbuf UNUSED,    // what is going to be the new curbuf,
                                       // NULL if unknown
-    int                trigger_leave_autocmds UNUSED)
+    int                trigger_leave_autocmds)
 {
     tabpage_T  *tp = curtab;