]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0581: Various lines are indented inconsistently v9.1.0581
authorzeertzjq <zeertzjq@outlook.com>
Sun, 14 Jul 2024 08:20:20 +0000 (10:20 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 14 Jul 2024 08:20:20 +0000 (10:20 +0200)
Problem:  style: Various lines are indented inconsistently
Solution: Retab these lines and correct some comments.
          (zeertzjq)

closes: #15259

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
22 files changed:
runtime/doc/index.txt
src/charset.c
src/eval.c
src/evalfunc.c
src/ex_docmd.c
src/fileio.c
src/getchar.c
src/globals.h
src/gui.c
src/gui_gtk_x11.c
src/indent.c
src/memline.c
src/normal.c
src/os_mswin.c
src/os_unix.c
src/popupmenu.c
src/search.c
src/tag.c
src/testdir/test_taglist.vim
src/version.c
src/vim9class.c
src/vim9expr.c

index 226c3b8aba2e1d6525729033a7c9fc41640e1441..c595d9d2a90426fdfd2a38ca2f813f8d43a6b14e 100644 (file)
@@ -1,4 +1,4 @@
-*index.txt*     For Vim version 9.1.  Last change: 2023 Jul 06
+*index.txt*     For Vim version 9.1.  Last change: 2023 Jul 14
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -757,7 +757,7 @@ tag         char          note action in Normal mode        ~
                                   search pattern and Visually select it
 |gP|           ["x]gP          2  put the text [from register x] before the
                                   cursor N times, leave the cursor after it
-|gQ|           gQ                  switch to "Ex" mode with Vim editing
+|gQ|           gQ                 switch to "Ex" mode with Vim editing
 |gR|           gR              2  enter Virtual Replace mode
 |gT|           gT                 go to the previous tab page
 |gU|           gU{motion}      2  make Nmove text uppercase
index 9aa402ac5e569743b39b01a616e5e71fc208a636..45b16aa3ab7a9584381919a3d5c0a52e8e90a311 100644 (file)
@@ -827,20 +827,20 @@ linetabsize_no_outer(win_T *wp, linenr_T lnum)
 
     if (cts.cts_text_prop_count)
     {
-      int write_idx = 0;
-      for (int read_idx = 0; read_idx < cts.cts_text_prop_count; read_idx++)
-      {
-          textprop_T *tp = &cts.cts_text_props[read_idx];
-          if (tp->tp_col != MAXCOL)
-          {
-              if (read_idx != write_idx)
-                  cts.cts_text_props[write_idx] = *tp;
-              write_idx++;
-          }
-      }
-      cts.cts_text_prop_count = write_idx;
-      if (cts.cts_text_prop_count == 0)
-          VIM_CLEAR(cts.cts_text_props);
+       int write_idx = 0;
+       for (int read_idx = 0; read_idx < cts.cts_text_prop_count; read_idx++)
+       {
+           textprop_T *tp = &cts.cts_text_props[read_idx];
+           if (tp->tp_col != MAXCOL)
+           {
+               if (read_idx != write_idx)
+                   cts.cts_text_props[write_idx] = *tp;
+               write_idx++;
+           }
+       }
+       cts.cts_text_prop_count = write_idx;
+       if (cts.cts_text_prop_count == 0)
+           VIM_CLEAR(cts.cts_text_props);
     }
 
     win_linetabsize_cts(&cts, (colnr_T)MAXCOL);
index beb913ffe12474bfc55dd9f3bdc78a69ae5a5f67..a001bba6a079882a86987a340f6bdb5df030ef8d 100644 (file)
@@ -6195,7 +6195,7 @@ object_tv2string(
        r = (char_u *)"object of [unknown]";
     }
     else if (copyID != 0 && obj->obj_copyID == copyID
-            && obj->obj_class->class_obj_member_count != 0)
+           && obj->obj_class->class_obj_member_count != 0)
     {
        size_t n = 25 + strlen((char *)obj->obj_class->class_name);
        r = alloc(n);
index 52673b48cc7dc45189f0922907def23f1c60ca0f..c09242101a70baaad61cbfbc8e7bc1215d3232e6 100644 (file)
@@ -3127,8 +3127,8 @@ internal_func_check_arg_types(
     // functions, check the arguments are not types.
     if (!(func_allows_type(idx)))
     {
-        for (int i = 0; i < argcount; ++i)
-            if (check_type_is_value(types[i].type_curr) == FAIL)
+       for (int i = 0; i < argcount; ++i)
+           if (check_type_is_value(types[i].type_curr) == FAIL)
                return FAIL;
     }
 
index c90d64d7db149c9c4a5685c18b652ff4d0a44b4e..53f9d1af2c10643c95897231278906059cc5a241 100644 (file)
@@ -2860,9 +2860,8 @@ parse_command_modifiers(
     {
        // The automatically inserted Visual area range is skipped, so that
        // typing ":cmdmod cmd" in Visual mode works without having to move the
-       // range to after the modififiers. The command will be
-       // "'<,'>cmdmod cmd", parse "cmdmod cmd" and then put back "'<,'>"
-       // before "cmd" below.
+       // range to after the modifiers. The command will be "'<,'>cmdmod cmd",
+       // parse "cmdmod cmd" and then put back "'<,'>" before "cmd" below.
        eap->cmd += 5;
        cmd_start = eap->cmd;
        has_visual_range = TRUE;
@@ -7267,7 +7266,7 @@ ex_resize(exarg_T *eap)
 ex_find(exarg_T *eap)
 {
     if (!check_can_set_curbuf_forceit(eap->forceit))
-        return;
+       return;
 
     char_u     *fname;
     int                count;
@@ -7359,7 +7358,7 @@ ex_edit(exarg_T *eap)
            // All other commands must obey 'winfixbuf' / ! rules
            && (is_other_file(0, ffname) && !check_can_set_curbuf_forceit(eap->forceit))
     )
-        return;
+       return;
 
     do_exedit(eap, NULL);
 }
index e7f333208e0b3e3723b182b6424f6a9968e7527b..7bae626a97e4450d0f69a733904dbf63f4783a9a 100644 (file)
@@ -3936,7 +3936,7 @@ vim_copyfile(char_u *from, char_u *to)
     ret = mch_lstat((char *)from, &st);
     if (ret >= 0 && S_ISLNK(st.st_mode))
     {
-        ret = FAIL;
+       ret = FAIL;
 
        len = readlink((char *)from, linkbuf, MAXPATHL);
        if (len > 0)
index 9d54377cc137cf9828f09fe9b6b0b67b7b196039..a0787f5fff44500453720686a6be6d06a7b2c16b 100644 (file)
@@ -2036,8 +2036,8 @@ vgetc(void)
                vgetc_char = c;
            }
 
-           // a keypad or special function key was not mapped, use it like
-           // its ASCII equivalent
+           // A keypad or special function key was not mapped, use it like
+           // its ASCII equivalent.
            switch (c)
            {
                case K_KPLUS:   c = '+'; break;
index fb5c7b34a2363e50ce0c3f9968ae8f780680c317..12c4ff723417f3bbca6ecced13fb63eac13eb394 100644 (file)
@@ -131,8 +131,8 @@ EXTERN int  screen_Columns INIT(= 0);   // actual size of ScreenLines[]
  */
 EXTERN int     mod_mask INIT(= 0);             // current key modifiers
 
-// The value of "mod_mask" and the unomdified character before calling
-// merge_modifyOtherKeys().
+// The value of "mod_mask" and the unmodified character in vgetc() after it has
+// called vgetorpeek() enough times.
 EXTERN int     vgetc_mod_mask INIT(= 0);
 EXTERN int     vgetc_char INIT(= 0);
 
index 25662ef2cbe2f838240693194fc5428981383d21..8e7b079a5a4ea463ecff3af5c49080b23f70cfc7 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -460,7 +460,7 @@ gui_init_check(void)
     // and in that case we don't want to overwrite ligatures map that has already
     // been correctly populated (as that would lead to a cleared ligatures maps).
     if (*p_guiligatures == NUL)
-        CLEAR_FIELD(gui.ligatures_map);
+       CLEAR_FIELD(gui.ligatures_map);
 #endif
 
 #if defined(ALWAYS_USE_GUI) || defined(VIMDLL)
index 67ee531b6f573d9ac9bcab79387a5ee9adde36eb..6c97d1a196ee82af79f897100b4034fbd4af89c2 100644 (file)
@@ -797,8 +797,8 @@ draw_event(GtkWidget *widget UNUSED,
 # if GTK_CHECK_VERSION(3,10,0)
     static gboolean
 scale_factor_event(GtkWidget *widget,
-                  GParamSpec* pspec UNUSED,
-                  gpointer   user_data UNUSED)
+                  GParamSpec* pspec UNUSED,
+                  gpointer   user_data UNUSED)
 {
     if (gui.surface != NULL)
        cairo_surface_destroy(gui.surface);
index 777db244af80b36122cb252157fcea8f81b1620b..0d6fadb26dcbe8bbe18494ead989480f54558639 100644 (file)
@@ -996,7 +996,7 @@ get_breakindent_win(
 # else
        if (wp->w_briopt_vcol == 0)
            prev_indent = get_indent_str(line,
-                                       (int)wp->w_buffer->b_p_ts, no_ts);
+                                       (int)wp->w_buffer->b_p_ts, no_ts);
 # endif
        prev_tick = CHANGEDTICK(wp->w_buffer);
        prev_listopt = wp->w_briopt_list;
index 6c63fad121a5031372c372939e835d40d4c3b7a0..9e579cdfd9ec93977362af140e167cbc73044b50 100644 (file)
@@ -2710,7 +2710,7 @@ ml_get_buf_len(buf_T *buf, linenr_T lnum)
     char_u     *line;
 
     if (*(line = ml_get_buf(buf, lnum, FALSE)) == NUL)
-        return 0;
+       return 0;
 
     if (buf->b_ml.ml_line_textlen <= 0)
        buf->b_ml.ml_line_textlen = (int)STRLEN(line) + 1;
index b55d941fcc4464c6a442b23d84bad5379432d0af..541c8ed1c466d14f379770dd01cfacbd944ca5b8 100644 (file)
@@ -4462,7 +4462,7 @@ nv_brackets(cmdarg_T *cap)
                            SAFE_islower(cap->nchar) ? ACTION_SHOW : ACTION_GOTO,
                cap->cmdchar == ']' ? curwin->w_cursor.lnum + 1 : (linenr_T)1,
                (linenr_T)MAXLNUM,
-               FALSE);
+               FALSE);
            vim_free(ptr);
            curwin->w_set_curswant = TRUE;
        }
index df760fd5ec82fe34bffdf717a6fb37b13db76bf2..95e3cbcb91eed102a87d1afde40a048b2c0c73b6 100644 (file)
@@ -2921,7 +2921,7 @@ expand_font_enumproc(
     // Filter only on ANSI. Otherwise will see a lot of random fonts that we
     // usually don't want.
     if (lf->lfCharSet != ANSI_CHARSET)
-        return 1;
+       return 1;
 
     int (*add_match)(char_u *) = (int (*)(char_u *))lparam;
 
@@ -2955,7 +2955,7 @@ gui_mch_expand_font(optexpand_T *args, void *param UNUSED, int (*add_match)(char
 
        // Always fill in with the current font size as first option for
        // convenience. We simply round to the closest integer for simplicity.
-        int font_height = (int)round(
+       int font_height = (int)round(
                pixels_to_points(-current_font_height, TRUE, (long_i)NULL));
        vim_snprintf(buf, ARRAY_LENGTH(buf), "h%d", font_height);
        add_match((char_u *)buf);
index 76e7a8a0270d4f68da3d159a2fe3cbb8d5cf2c7e..e77a4b23c318f6ff66025431e77c2ba587a8f71d 100644 (file)
@@ -7501,9 +7501,9 @@ gpm_open(void)
     {
        Gpm_Close(); // We don't want to talk to xterm via gpm
 
-        // Gpm_Close fails to properly restore the WINCH and TSTP handlers,
-        // leading to Vim ignoring resize signals. We have to re-initialize
-        // these handlers again here.
+       // Gpm_Close fails to properly restore the WINCH and TSTP handlers,
+       // leading to Vim ignoring resize signals. We have to re-initialize
+       // these handlers again here.
 # ifdef SIGWINCH
        mch_signal(SIGWINCH, sig_winch);
 # endif
index c18c97f7b84edd55b15e7cb80c8ce1f603690d43..c116b102afa2d903e930b0c8637c6eb126217a73 100644 (file)
@@ -527,7 +527,7 @@ pum_screen_puts_with_attrs(
        else
 #endif
            attr = attrs[col - col_start];
-        screen_puts_len(ptr, char_len, row, col, attr);
+       screen_puts_len(ptr, char_len, row, col, attr);
        col += mb_ptr2cells(ptr);
        ptr += char_len;
     }
index 0b39d90b0e1a5f5b191e2c71d0f433592d7a797e..d1eb5007d2119d55600b8a1c7efcd413d2c83783 100644 (file)
@@ -5106,11 +5106,11 @@ fuzzy_match_str_with_pos(char_u *str UNUSED, char_u *pat UNUSED)
     int                    j = 0;
 
     if (str == NULL || pat == NULL)
-        return NULL;
+       return NULL;
 
     match_positions = ALLOC_ONE(garray_T);
     if (match_positions == NULL)
-        return NULL;
+       return NULL;
     ga_init2(match_positions, sizeof(int_u), 10);
 
     if (!fuzzy_match(str, pat, FALSE, &score, matches, MAX_FUZZY_MATCHES)
index 283343aae21ef156d762390450864d6c4efb8b49..f94d3eb9d4ec3854b048f92d0b0b9bc1fbb75242 100644 (file)
--- a/src/tag.c
+++ b/src/tag.c
@@ -310,7 +310,7 @@ do_tag(
 #endif
 
     if (postponed_split == 0 && !check_can_set_curbuf_forceit(forceit))
-        return FALSE;
+       return FALSE;
 
     if (type == DT_HELP)
     {
@@ -3713,7 +3713,7 @@ jumpto_tag(
     char_u     *lbuf;
 
     if (postponed_split == 0 && !check_can_set_curbuf_forceit(forceit))
-        return FAIL;
+       return FAIL;
 
     // Make a copy of the line, it can become invalid when an autocommand calls
     // back here recursively.
index 236f5ac0717d80c1ac5045adf3757e1d2ad1012d..c5c7df2a9c7fd82846eccf2cdb6b470e2ada6242 100644 (file)
@@ -100,9 +100,9 @@ func Test_tagfiles()
 
   help
   let tf = tagfiles()
-  " if 'helplang includes another language, then we may find
-  " 2 tagfiles (e.g.: for EN and RU)
-  " we may need to adjust this, if further translated help files are included
+  " If 'helplang' includes another language, then we may find 2 tagfiles
+  " (e.g.: for EN and RU).
+  " We may need to adjust this, if further translated help files are included.
   call assert_inrange(1, 2, len(tf))
   call assert_equal(fnamemodify(expand('$VIMRUNTIME/doc/tags'), ':p:gs?\\?/?'),
        \           fnamemodify(tf[0], ':p:gs?\\?/?'))
index b117443cad834d28b2da6a08db54bd54907daf07..fe4badc89afb515340148fb92c2843e6d4f205a2 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    581,
 /**/
     580,
 /**/
index 933708288fb92b0d07ffe943dc54ce1338ff2e24..70f2405f01b97e54a91175e6cb82387b1c33166c 100644 (file)
@@ -3101,7 +3101,7 @@ class_member_lookup(class_T *cl, char_u *name, size_t namelen, int *idx)
        {
            ret_m = m;
            ret_idx = i;
-            break;
+           break;
        }
     }
     if (idx != NULL)
@@ -3184,11 +3184,11 @@ object_member_lookup(class_T *cl, char_u *name, size_t namelen, int *idx)
            }
        }
        else if (STRCMP(name, m->ocm_name) == 0)
-        {
+       {
            ret_m = m;
            ret_idx = i;
-            break;
-        }
+           break;
+       }
     }
     if (idx != NULL)
        *idx = ret_idx;
@@ -3684,7 +3684,7 @@ method_not_found_msg(class_T *cl, vartype_T v_type, char_u *name, size_t len)
     }
     else
        semsg(_(e_method_not_found_on_class_str_str), method_name,
-               cl->class_name);
+               cl->class_name);
     vim_free(method_name);
 }
 
index 7af8bd63b3a4feacfd5d2268ad203893bed26e15..c2428f4bbeb60a0dc7ec8127b8a84e8d7f0089da 100644 (file)
@@ -425,7 +425,7 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
 
     if (type->tt_type == VAR_OBJECT)
     {
-        ocmember_T *m = object_member_lookup(cl, name, len, &m_idx);
+       ocmember_T *m = object_member_lookup(cl, name, len, &m_idx);
        if (m_idx >= 0)
        {
            if (*name == '_' && !inside_class(cctx, cl))