]> granicus.if.org Git - vim/commitdiff
patch 8.1.1086: too many curly braces v8.1.1086
authorBram Moolenaar <Bram@vim.org>
Sat, 30 Mar 2019 17:47:01 +0000 (18:47 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 30 Mar 2019 17:47:01 +0000 (18:47 +0100)
Problem:    Too many curly braces.
Solution:   Remove curly braces where they are not needed. (Hirohito Higashi,
            closes #3982)

42 files changed:
src/autocmd.c
src/buffer.c
src/crypt_zip.c
src/dosinst.c
src/edit.c
src/evalfunc.c
src/ex_cmds.c
src/ex_docmd.c
src/ex_getln.c
src/getchar.c
src/gui.c
src/gui_gtk.c
src/gui_mac.c
src/gui_motif.c
src/gui_photon.c
src/gui_w32.c
src/gui_x11.c
src/if_mzsch.c
src/if_python3.c
src/if_ruby.c
src/if_tcl.c
src/indent.c
src/insexpand.c
src/libvterm/src/pen.c
src/macros.h
src/memline.c
src/menu.c
src/misc1.c
src/move.c
src/netbeans.c
src/normal.c
src/ops.c
src/option.c
src/os_mswin.c
src/os_qnx.c
src/os_unix.c
src/os_win32.c
src/regexp_nfa.c
src/screen.c
src/spell.c
src/terminal.c
src/version.c

index 55650b46f7b055bd03be033da1872b3271b1c507..d81615ba8fdca354a28e372c062663970a61d4af 100644 (file)
@@ -517,9 +517,7 @@ au_del_group(char_u *name)
        }
        vim_free(AUGROUP_NAME(i));
        if (in_use)
-       {
            AUGROUP_NAME(i) = get_deleted_augroup();
-       }
        else
            AUGROUP_NAME(i) = NULL;
     }
index 6cfa41fab6b67354a1c6fb224f61896b8482e11e..33a7c66159cfeb2062fded3aa3bc05acab43ec2e 100644 (file)
@@ -1595,9 +1595,7 @@ do_buffer(
     set_curbuf(buf, action);
 
     if (action == DOBUF_SPLIT)
-    {
        RESET_BINDING(curwin);  /* reset 'scrollbind' and 'cursorbind' */
-    }
 
 #if defined(FEAT_EVAL)
     if (aborting())        /* autocmds may abort script processing */
@@ -3054,9 +3052,8 @@ buflist_list(exarg_T *eap)
        /* put "line 999" in column 40 or after the file name */
        i = 40 - vim_strsize(IObuff);
        do
-       {
            IObuff[len++] = ' ';
-       while (--i > 0 && len < IOSIZE - 18);
+       while (--i > 0 && len < IOSIZE - 18);
        vim_snprintf((char *)IObuff + len, (size_t)(IOSIZE - len),
                _("line %ld"), buf == curbuf ? curwin->w_cursor.lnum
                                               : (long)buflist_findlnum(buf));
index ed17d956b0856c3f861a25f10759fde61eb4b3a0..864812e18d74e47cf1f897426f9e7da821b76f21 100644 (file)
@@ -68,12 +68,12 @@ make_crc_tab(void)
 /*
  * Update the encryption keys with the next byte of plain text.
  */
-#define UPDATE_KEYS_ZIP(keys, c) { \
+#define UPDATE_KEYS_ZIP(keys, c) do { \
     keys[0] = CRC32(keys[0], (c)); \
     keys[1] += keys[0] & 0xff; \
     keys[1] = keys[1] * 134775813L + 1; \
     keys[2] = CRC32(keys[2], (int)(keys[1] >> 24)); \
-}
+} while (0)
 
 /*
  * Initialize for encryption/decryption.
@@ -98,9 +98,7 @@ crypt_zip_init(
     zs->keys[1] = 591751049L;
     zs->keys[2] = 878082192L;
     for (p = key; *p != NUL; ++p)
-    {
        UPDATE_KEYS_ZIP(zs->keys, (int)*p);
-    }
 }
 
 /*
index 49a2fa4f5dffa86ce5e8175e416c67a4a446def8..2c05cf4c2c42af19e58819cf1f181f22bf2ef3f9 100644 (file)
@@ -849,7 +849,7 @@ install_bat_choice(int idx)
             * for MSDOS and NT.
             * The order of preference is:
             * 1. $VIMRUNTIME/vim.exe       (user preference)
-            * 2. $VIM/vim70/vim.exe        (hard coded version)
+            * 2. $VIM/vim81/vim.exe        (hard coded version)
             * 3. installdir/vim.exe        (hard coded install directory)
             */
            fprintf(fd, "set VIM_EXE_DIR=%s\n", installdir);
@@ -1568,9 +1568,7 @@ register_openwith(
 
        for (i = 0; ERROR_SUCCESS == lRet
                           && i < sizeof(openwith) / sizeof(openwith[0]); i++)
-       {
            lRet = reg_create_key_and_value(hRootKey, openwith[i], NULL, "", flag);
-       }
     }
 
     return lRet;
index 0b5d0e8086a494032ff1480fa0bb973635ec97bc..d378cd16f27646e9e9f41526aeb0113d832ab152 100644 (file)
@@ -5363,9 +5363,8 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
        if (end == NULL && vpeekc() == NUL)
            break;
        do
-       {
            c = vgetc();
-       while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
+       while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
        if (c == NUL || got_int)
            // When CTRL-C was encountered the typeahead will be flushed and we
            // won't get the end sequence.
index 524031e0cd37d6f0f8679b96535d3755786f102f..2eafe140ce310e423393cf21dc5b1e2e1a7ae537 100644 (file)
@@ -3568,9 +3568,7 @@ f_expand(typval_T *argvars, typval_T *rettv)
            && argvars[2].v_type != VAR_UNKNOWN
            && tv_get_number_chk(&argvars[2], &error)
            && !error)
-    {
        rettv_list_set(rettv, NULL);
-    }
 
     s = tv_get_string(&argvars[0]);
     if (*s == '%' || *s == '#' || *s == '<')
@@ -6081,9 +6079,7 @@ f_glob(typval_T *argvars, typval_T *rettv)
        if (argvars[2].v_type != VAR_UNKNOWN)
        {
            if (tv_get_number_chk(&argvars[2], &error))
-           {
                rettv_list_set(rettv, NULL);
-           }
            if (argvars[3].v_type != VAR_UNKNOWN
                                    && tv_get_number_chk(&argvars[3], &error))
                options |= WILD_ALLLINKS;
@@ -6137,9 +6133,7 @@ f_globpath(typval_T *argvars, typval_T *rettv)
        if (argvars[3].v_type != VAR_UNKNOWN)
        {
            if (tv_get_number_chk(&argvars[3], &error))
-           {
                rettv_list_set(rettv, NULL);
-           }
            if (argvars[4].v_type != VAR_UNKNOWN
                                    && tv_get_number_chk(&argvars[4], &error))
                flags |= WILD_ALLLINKS;
index 25441247afb99ac2d97953483fb3f28acc2b7b56..594abfcd59beb6bbd8fd5e66fbb59ab0d6846072 100644 (file)
@@ -3361,9 +3361,7 @@ do_write(exarg_T *eap)
        /* Change directories when the 'acd' option is set and the file name
         * got changed or set. */
        if (eap->cmdidx == CMD_saveas || name_was_missing)
-       {
            DO_AUTOCHDIR;
-       }
     }
 
 theend:
index b253e9b734540633870f33110b0cf9907d472416..88d03eefd7a3e768c6316ca5e73b6cca645ef1fe 100644 (file)
@@ -8407,9 +8407,7 @@ ex_splitview(exarg_T *eap)
                || cmdmod.browse
 # endif
           )
-       {
            RESET_BINDING(curwin);
-       }
        else
            do_check_scrollbind(FALSE);
        do_exedit(eap, old_curwin);
index 3d38d2c7423e4ece224e6a084612720728fe8efd..52eda33c736daac1ac29bcc584222bfd31c0c168 100644 (file)
@@ -1029,9 +1029,8 @@ getcmdline_int(
        /* Get a character.  Ignore K_IGNORE and K_NOP, they should not do
         * anything, such as stop completion. */
        do
-       {
            c = safe_vgetc();
-       while (c == K_IGNORE || c == K_NOP);
+       while (c == K_IGNORE || c == K_NOP);
 
        if (KeyTyped)
        {
@@ -2833,9 +2832,8 @@ redraw:
                    if (*p == TAB)
                    {
                        do
-                       {
                            msg_putchar(' ');
-                       while (++vcol % 8);
+                       while (++vcol % 8);
                        ++p;
                    }
                    else
@@ -2908,9 +2906,8 @@ redraw:
        {
            /* Don't use chartabsize(), 'ts' can be different */
            do
-           {
                msg_putchar(' ');
-           while (++vcol % 8);
+           while (++vcol % 8);
        }
        else
        {
index 0e9942ba34dae7c7d4115628b5106045b62b0210..e8926d4296940a868872653e73ce9ede4cff2fe8 100644 (file)
@@ -1813,9 +1813,8 @@ plain_vgetc(void)
     int c;
 
     do
-    {
        c = safe_vgetc();
-    while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
+    while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
 
     if (c == K_PS)
        /* Only handle the first pasted character.  Drop the rest, since we
index ada338f7f2fe1f79647d7b9c53d859bf4361b155..15974e54ea6dc9f5105089276c0716a3e55b2b8e 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -3508,9 +3508,7 @@ gui_init_which_components(char_u *oldval UNUSED)
                else
                {
                    FOR_ALL_WINDOWS(wp)
-                   {
                        gui_do_scrollbar(wp, i, gui.which_scrollbars[i]);
-                   }
                }
                if (gui.which_scrollbars[i] != prev_which_scrollbars[i])
                {
@@ -3830,9 +3828,7 @@ gui_remove_scrollbars(void)
        else
        {
            FOR_ALL_WINDOWS(wp)
-           {
                gui_do_scrollbar(wp, i, FALSE);
-           }
        }
        curtab->tp_prev_which_scrollbars[i] = -1;
     }
index ba8fd9dc1531261b8ad1592c0e37c40f7eece5a9..126eaf06d93f1f19b8775f83df4b1006a087accf 100644 (file)
@@ -2573,9 +2573,7 @@ entry_changed_cb(GtkWidget * entry, GtkWidget * dialog)
     nonempty = (entry_text[0] != '\0');
 
     if (dialog == find_widgets.dialog)
-    {
        gtk_widget_set_sensitive(find_widgets.find, nonempty);
-    }
 
     if (dialog == repl_widgets.dialog)
     {
index bfecf81e65e0e96303dffa81f81762a1574aea74..c177ee650b265937ce5fd5c9601a9e1ed7d5a302 100644 (file)
@@ -360,9 +360,7 @@ C2Pascal_save_and_remove_backslash(char_u *Cstring)
        for (c = Cstring, p = PascalString+1, len = 0; (*c != 0) && (len < 255); c++)
        {
            if ((*c == '\\') && (c[1] != 0))
-           {
                c++;
-           }
            *p = *c;
            p++;
            len++;
@@ -1259,25 +1257,19 @@ InstallAEHandlers(void)
     error = AEInstallEventHandler(kCoreEventClass, kAEOpenApplication,
                    NewAEEventHandlerUPP(Handle_aevt_oapp_AE), 0, false);
     if (error)
-    {
        return error;
-    }
 
     /* install quit application handler */
     error = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication,
                    NewAEEventHandlerUPP(Handle_aevt_quit_AE), 0, false);
     if (error)
-    {
        return error;
-    }
 
     /* install open document handler */
     error = AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,
                    NewAEEventHandlerUPP(HandleODocAE), 0, false);
     if (error)
-    {
        return error;
-    }
 
     /* install print document handler */
     error = AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments,
@@ -1331,15 +1323,11 @@ InstallAEHandlers(void)
     error = AEInstallEventHandler('KAHL', 'GTTX',
                    NewAEEventHandlerUPP(Handle_KAHL_GTTX_AE), 0, false);
     if (error)
-    {
        return error;
-    }
     error = AEInstallEventHandler('KAHL', 'SRCH',
                    NewAEEventHandlerUPP(Handle_KAHL_SRCH_AE), 0, false);
     if (error)
-    {
        return error;
-    }
     error = AEInstallEventHandler('KAHL', 'MOD ',
                    NewAEEventHandlerUPP(Handle_KAHL_MOD_AE), 0, false);
 #endif
@@ -3857,9 +3845,7 @@ draw_string_QD(int row, int col, char_u *s, int len, int flags)
     /*  SelectFont(hdc, gui.currFont); */
 
        if (flags & DRAW_TRANSP)
-       {
            TextMode(srcOr);
-       }
 
        MoveTo(TEXT_X(col), TEXT_Y(row));
        DrawText((char *)s, 0, len);
@@ -3939,9 +3925,7 @@ draw_string_ATSUI(int row, int col, char_u *s, int len, int flags)
 
        /*  SelectFont(hdc, gui.currFont); */
        if (flags & DRAW_TRANSP)
-       {
            TextMode(srcOr);
-       }
 
        MoveTo(TEXT_X(col), TEXT_Y(row));
 
@@ -4620,13 +4604,9 @@ gui_mch_set_text_area_pos(int x, int y, int w, int h)
     GetWindowBounds(gui.VimWindow, kWindowGlobalPortRgn, &VimBound);
 
     if (gui.which_scrollbars[SBAR_LEFT])
-    {
        VimBound.left = -gui.scrollbar_width + 1;
-    }
     else
-    {
        VimBound.left = 0;
-    }
 
     SetWindowBounds(gui.VimWindow, kWindowGlobalPortRgn, &VimBound);
 
@@ -5675,9 +5655,8 @@ gui_mch_dialog(
 
     /* Hang until one of the button is hit */
     do
-    {
        ModalDialog(dialogUPP, &itemHit);
-    while ((itemHit < 1) || (itemHit > lastButton));
+    while ((itemHit < 1) || (itemHit > lastButton));
 
 #ifdef USE_CARBONKEYHANDLER
     dialog_busy = FALSE;
index 6eb618f17c45c6e4c5a673e0c118e866b31e95f8..421733933a781749f76cae40667aa867ee3e687f 100644 (file)
@@ -916,13 +916,9 @@ gui_mch_add_menu(vimmenu_T *menu, int idx)
 # endif
        {
            if (gui.menu_bg_pixel != INVALCOLOR)
-           {
                XtSetArg(arg[0], XmNbackground, gui.menu_bg_pixel); n++;
-           }
            if (gui.menu_fg_pixel != INVALCOLOR)
-           {
                XtSetArg(arg[1], XmNforeground, gui.menu_fg_pixel); n++;
-           }
            menu->submenu_id = XmCreatePopupMenu(textArea, "contextMenu",
                                                                      arg, n);
            menu->id = (Widget)0;
@@ -1243,9 +1239,7 @@ add_pixmap_args(vimmenu_T *menu, Arg *args, int n)
     else
     {
        if (menu->xpm_fname != NULL)
-       {
            XtSetArg(args[n], XmNpixmapFile, menu->xpm_fname); n++;
-       }
        XtSetArg(args[n], XmNpixmapData, menu->xpm); n++;
        XtSetArg(args[n], XmNlabelLocation, XmBOTTOM); n++;
     }
index 94012287e799c5199d73bcf339e5bee38f48c9b4..d7731853bf5947e49ca5a7d62d8e4352e7f11adf 100644 (file)
@@ -451,9 +451,7 @@ gui_ph_handle_keyboard(PtWidget_t *widget, void *data, PtCallbackInfo_t *info)
 
     /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */
     if (key->key_flags & Pk_KF_Compose)
-    {
        return Pt_CONTINUE;
-    }
 
     if ((key->key_flags & Pk_KF_Cap_Valid) &&
            PkIsKeyDown(key->key_flags))
@@ -1011,9 +1009,7 @@ gui_ph_pg_remove_buffer(char *name)
            for (i = 0; i < num_panels; i++)
            {
                if (STRCMP(panel_titles[ i ], name) != 0)
-               {
                    *s++ = panel_titles[ i ];
-               }
            }
            num_panels--;
 
@@ -1334,9 +1330,7 @@ gui_mch_update(void)
 
     PtAppAddWorkProc(NULL, exit_gui_mch_update, &working);
     while ((working == TRUE) && !vim_is_input_buf_full())
-    {
        PtProcessEvent();
-    }
 }
 
     int
@@ -2408,9 +2402,7 @@ gui_ph_toolbar_find_icon(vimmenu_T *menu)
 
     if (menu->iconidx >= 0 &&
            (menu->iconidx < ARRAY_LENGTH(gui_ph_toolbar_images)))
-    {
        return gui_ph_toolbar_images[menu->iconidx];
-    }
 
     return NULL;
 }
index c4bc3c912cdfd38a93729bc1b0f85c8d64a950f8..292fbdd40c29f8e100616cd947358d6666e3bec5 100644 (file)
@@ -1155,9 +1155,7 @@ _OnFindRepl(void)
     /* If the OS is Windows NT, and 'encoding' differs from active codepage:
      * convert text from wide string. */
     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
-    {
        findrep_wtoa(&s_findrep_struct, &s_findrep_struct_w);
-    }
 
     if (s_findrep_struct.Flags & FR_DIALOGTERM)
        /* Give main window the focus back. */
@@ -2633,9 +2631,7 @@ gui_mch_update_tabline(void)
            }
        }
        if (wstr == NULL)
-       {
            TabCtrl_SetItem(s_tabhwnd, nr, &tie);
-       }
     }
 
     /* Remove any old labels. */
@@ -4289,9 +4285,7 @@ gui_mswin_get_menu_height(
     }
 
     if (fix_window && menu_height != old_menu_height)
-    {
        gui_set_shellsize(FALSE, FALSE, RESIZE_VERT);
-    }
     old_menu_height = menu_height;
 
     return menu_height;
@@ -4861,9 +4855,7 @@ _WndProc(
     default:
 #ifdef MSWIN_FIND_REPLACE
        if (uMsg == s_findrep_msg && s_findrep_msg != 0)
-       {
            _OnFindRepl();
-       }
 #endif
        return MyWindowProc(hwnd, uMsg, wParam, lParam);
     }
index ad91a21013fd3c71d0a8449e82279dbc6ba2706e..6ff164417309278557d5a527a6815a863d9c5599 100644 (file)
@@ -3015,9 +3015,7 @@ gui_x11_send_event_handler(
 
     if (e->type == PropertyNotify && e->window == commWindow
            && e->atom == commProperty &&  e->state == PropertyNewValue)
-    {
        serverEventProc(gui.dpy, event, 0);
-    }
 }
 #endif
 
index 27925afb3c8363759e2f75a7519896e3b42b8f58..a35d0001004f0f607cdb2a574cf045736daba28b 100644 (file)
@@ -3805,9 +3805,7 @@ sandbox_file_guard(int argc UNUSED, Scheme_Object **argv)
            Scheme_Object *item = SCHEME_CAR(requested_access);
            if (scheme_eq(item, M_write) || scheme_eq(item, M_read)
                    || scheme_eq(item, M_execute) || scheme_eq(item, M_delete))
-           {
                raise_vim_exn(_("not allowed in the Vim sandbox"));
-           }
            requested_access = SCHEME_CDR(requested_access);
        }
     }
index e8ab44f3beb2eeb6b00b6aa021e41d1844279232..d93d6331860c5a0f86ae5116cb102b96967778e1 100644 (file)
@@ -1236,9 +1236,7 @@ BufferSubscript(PyObject *self, PyObject* idx)
              (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
              &start, &stop,
              &step, &slicelen) < 0)
-       {
            return NULL;
-       }
        return BufferSlice((BufferObject *)(self), start, stop);
     }
     else
@@ -1268,9 +1266,7 @@ BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val)
              (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
              &start, &stop,
              &step, &slicelen) < 0)
-       {
            return -1;
-       }
        return RBAsSlice((BufferObject *)(self), start, stop, val, 1,
                          (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count,
                          NULL);
@@ -1352,9 +1348,7 @@ RangeSubscript(PyObject *self, PyObject* idx)
                ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
                &start, &stop,
                &step, &slicelen) < 0)
-       {
            return NULL;
-       }
        return RangeSlice((RangeObject *)(self), start, stop);
     }
     else
@@ -1371,7 +1365,8 @@ RangeAsSubscript(PyObject *self, PyObject *idx, PyObject *val)
     {
        long n = PyLong_AsLong(idx);
        return RangeAsItem(self, n, val);
-    } else if (PySlice_Check(idx))
+    }
+    else if (PySlice_Check(idx))
     {
        Py_ssize_t start, stop, step, slicelen;
 
@@ -1379,9 +1374,7 @@ RangeAsSubscript(PyObject *self, PyObject *idx, PyObject *val)
                ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
                &start, &stop,
                &step, &slicelen) < 0)
-       {
            return -1;
-       }
        return RangeAsSlice(self, start, stop, val);
     }
     else
index 63294f4e5eb3dfc7d676d1851816a48582b823ed..2727524f89a70e7dd13b95a31b64e992ef59b709 100644 (file)
@@ -846,9 +846,7 @@ vim_str2rb_enc_str(const char *s)
        enc = rb_enc_find((char *)sval);
        vim_free(sval);
        if (enc)
-       {
            return rb_enc_str_new(s, (long)strlen(s), enc);
-       }
     }
 #endif
     return rb_str_new2(s);
@@ -1171,9 +1169,7 @@ vim_to_ruby(typval_T *tv)
        if (list != NULL)
        {
            for (curr = list->lv_first; curr != NULL; curr = curr->li_next)
-           {
                rb_ary_push(result, vim_to_ruby(&curr->li_tv));
-           }
        }
     }
     else if (tv->v_type == VAR_DICT)
@@ -1227,9 +1223,7 @@ vim_evaluate(VALUE self UNUSED, VALUE str)
 
     tv = eval_expr((char_u *)StringValuePtr(str), NULL);
     if (tv == NULL)
-    {
        return Qnil;
-    }
     result = vim_to_ruby(tv);
 
     free_tv(tv);
index 46378a27fbed36a94cbd95c12e059810d15a077b..a5b80d4954a6e2dfc372d4556670a27660993748 100644 (file)
@@ -811,9 +811,7 @@ bufselfcmd(
 
            pos = NULL;
            if (line[0] != '\0'  &&  line[1] == '\0')
-           {
                pos = getmark(line[0], FALSE);
-           }
            if (pos == NULL)
            {
                Tcl_SetResult(interp, _("invalid mark name"), TCL_STATIC);
@@ -1529,9 +1527,7 @@ tclsetdelcmd(
        if (reflist->interp == interp && reflist->vimobj == vimobj)
        {
            if (reflist->delcmd)
-           {
                Tcl_DecrRefCount(reflist->delcmd);
-           }
            Tcl_IncrRefCount(delcmd);
            reflist->delcmd = delcmd;
            return TCL_OK;
index 1ffa76695469b119c54330411e3f0f1167daa4c1..893ca298c0639844e9ee10b2843fd6ccf8e4776c 100644 (file)
@@ -3870,9 +3870,7 @@ find_match(int lookfor, linenr_T ourscope)
            // this must be the if that we want!
            // match the indent level of that if.
            if (elselevel <= 0 && whilelevel <= 0)
-           {
                return OK;
-           }
        }
     }
     return FAIL;
index c646674a64ce4a5cf91bac91ed14bba711ae49f0..6373993131d4d5beee9e4fb53690834f2b6c6189 100644 (file)
@@ -2606,9 +2606,7 @@ ins_compl_get_exp(pos_T *ini)
                    TAG_REGEXP | TAG_NAMES | TAG_NOIC | TAG_INS_COMP
                    | (ctrl_x_mode != CTRL_X_NORMAL ? TAG_VERBOSE : 0),
                    TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
-           {
                ins_compl_add_matches(num_matches, matches, p_ic);
-           }
            p_ic = save_p_ic;
            break;
 
index b7800950e3a8e00092316902e8d8f21c4bd424a8..7d8cdc369e8f37a8d8a0493097d8439a6d406105 100644 (file)
@@ -385,12 +385,13 @@ INTERNAL void vterm_state_setpen(VTermState *state, const long args[], int argco
       break;
     }
 
-    if(!done)
+    if (!done)
     {
       DEBUG_LOG1("libvterm: Unhandled CSI SGR %lu\n", arg);
     }
 
-    while(CSI_ARG_HAS_MORE(args[argi++]));
+    while (CSI_ARG_HAS_MORE(args[argi++]))
+      ;
   }
 }
 
index 510be9bdadabad6fc165c34d538bbf63c0c1721b..571fed0a7edc1052e9a168838e25c35dec1741b1 100644 (file)
@@ -32,7 +32,7 @@
                       ? (a)->col < (b)->col \
                       : (a)->coladd < (b)->coladd)
 #define EQUAL_POS(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd))
-#define CLEAR_POS(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;}
+#define CLEAR_POS(a) do {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;} while (0)
 
 #define LTOREQ_POS(a, b) (LT_POS(a, b) || EQUAL_POS(a, b))
 
 /* get length of multi-byte char, not including composing chars */
 #define MB_CPTR2LEN(p)     (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
 
-#define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
+#define MB_COPY_CHAR(f, t) do { if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++; } while (0)
 #define MB_CHARLEN(p)      (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
 #define MB_CHAR2LEN(c)     (has_mbyte ? mb_char2len(c) : 1)
 #define PTR2CHAR(p)        (has_mbyte ? mb_ptr2char(p) : (int)*(p))
 # define DO_AUTOCHDIR do { /**/ } while (0)
 #endif
 
-#define RESET_BINDING(wp)  (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE
+#define RESET_BINDING(wp)  do { (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE; \
+                           } while (0)
 
 #ifdef FEAT_DIFF
 # define PLINES_NOFILL(x) plines_nofill(x)
index 66be0f3334b44c94682273fd014d8c832f91129a..6e5d3f2dbcb0e0ebb26063b9f3529bd719c071b8 100644 (file)
@@ -1359,9 +1359,7 @@ ml_recover(void)
            && ((mch_stat((char *)mfp->mf_fname, &swp_stat) != -1
                    && org_stat.st_mtime > swp_stat.st_mtime)
                || org_stat.st_mtime != mtime))
-    {
        emsg(_("E308: Warning: Original file may have been changed"));
-    }
     out_flush();
 
     /* Get the 'fileformat' and 'fileencoding' from block zero. */
@@ -5307,9 +5305,7 @@ ml_updatechunk(
             curix < buf->b_ml.ml_usedchunks - 1
             && line >= curline + buf->b_ml.ml_chunksize[curix].mlcs_numlines;
             curix++)
-       {
            curline += buf->b_ml.ml_chunksize[curix].mlcs_numlines;
-       }
     }
     else if (curix < buf->b_ml.ml_usedchunks - 1
              && line >= curline + buf->b_ml.ml_chunksize[curix].mlcs_numlines)
index 41669ed4ca272fed4d46e73a48f526d53741a6b0..f71ede94560c6f0294ae1b032f17e2d3df3d1acf 100644 (file)
@@ -1701,9 +1701,7 @@ popup_mode_name(char_u *name, int idx)
     {
        mch_memmove(p + 5 + mode_chars_len, p + 5, (size_t)(len - 4));
        for (i = 0; i < mode_chars_len; ++i)
-       {
            p[5 + i] = menu_mode_chars[idx][i];
-       }
     }
     return p;
 }
@@ -1889,9 +1887,7 @@ get_menu_mode(void)
 {
 #ifdef FEAT_TERMINAL
     if (term_use_loop())
-    {
        return MENU_INDEX_TERMINAL;
-    }
 #endif
     if (VIsual_active)
     {
index 5781aa5b39eb4b12f9e68d37d35dee598727d925..960f63805da9d93d5b0c9425ef3c624713cec44b 100644 (file)
@@ -1949,9 +1949,7 @@ get_last_leader_offset(char_u *line, char_u **flags)
            string = vim_strchr(part_buf, ':');
            if (string == NULL) /* If everything is fine, this cannot actually
                                 * happen. */
-           {
                continue;
-           }
            *string++ = NUL;    /* Isolate flags from string. */
            com_leader = string;
 
@@ -4093,9 +4091,7 @@ expand_env_esc(
                            || (*src == '%' && *tail != '%')
 #endif
                            ))
-                   {
                        *var++ = *tail++;
-                   }
                }
 
 #if defined(MSWIN) || defined(UNIX)
index e678b8784cbb6db9dd86e0156876ecef97a906c7..232a87506d6a93281f992aed63d7b0f39add7f6c 100644 (file)
@@ -1614,9 +1614,7 @@ botline_forw(lineoff_T *lp)
            lp->height = 1;
        else
 #endif
-       {
            lp->height = PLINES_NOFILL(lp->lnum);
-       }
     }
 }
 
index e49797a3228f7530618459ec5418272cf1223b94..7c2ab42b9b8b4ec380aef62ad3090638750a9954 100644 (file)
@@ -1509,9 +1509,7 @@ nb_do_cmd(
            long savedChars = atol((char *)args);
 
            if (buf == NULL || buf->bufp == NULL)
-           {
                nbdebug(("    invalid buffer identifier in saveDone\n"));
-           }
            else
                print_save_msg(buf, savedChars);
 /* =====================================================================*/
@@ -1990,9 +1988,7 @@ nb_do_cmd(
            args = (char_u *)cp;
 # ifdef NBDEBUG
            if (vim_ignored != -1)
-           {
                nbdebug(("    partial line annotation -- Not Yet Implemented!\n"));
-           }
 # endif
            if (serNum >= GUARDEDOFFSET)
            {
index f99c7e3ecf94597f73ced53a3fd612c03091e587..6b3a78b108c936bfb6d504e709fc1a4edfc3d7e8 100644 (file)
@@ -811,9 +811,7 @@ getcount:
            }
            else if ((nv_cmds[idx].cmd_flags & NV_SSS)
                                               && (mod_mask & MOD_MASK_SHIFT))
-           {
                mod_mask &= ~MOD_MASK_SHIFT;
-           }
        }
     }
 
@@ -3507,9 +3505,7 @@ find_ident_at_pos(
                        && col <= (int)startcol
                        && find_is_eval_item(ptr + col, &col, &bn, FORWARD))
                )
-       {
            ++col;
-       }
 
     return col;
 }
@@ -4329,9 +4325,7 @@ find_decl(
         * inside a comment, continue searching.  For K&R style function
         * declarations this skips the function header without types. */
        if (!valid)
-       {
            CLEAR_POS(&found_pos);
-       }
        else
            found_pos = curwin->w_cursor;
        /* Remove SEARCH_START from flags to avoid getting stuck at one
@@ -9449,9 +9443,7 @@ nv_open(cmdarg_T *cap)
        v_swap_corners(cap->cmdchar);
 #ifdef FEAT_JOB_CHANNEL
     else if (bt_prompt(curbuf))
-    {
        clearopbeep(cap->oap);
-    }
 #endif
     else
        n_opencmd(cap);
index 1b39c3fb20c473cd6b627b0c7480aefaee9183cb..e939f046478ed4c328946d9690baf924e6cefa27 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -259,9 +259,7 @@ op_shift(oparg_T *oap, int curs_top, int amount)
 #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT)
            if (first_char != '#' || !preprocs_left())
 #endif
-       {
            shift_line(oap->op_type == OP_LSHIFT, p_sr, amount, FALSE);
-       }
        ++curwin->w_cursor.lnum;
     }
 
@@ -3157,9 +3155,7 @@ op_yank(oparg_T *oap, int deleting, int mess)
                    if (startcol > endcol || is_oneChar)
                        bd.textlen = 0;
                    else
-                   {
                        bd.textlen = endcol - startcol + oap->inclusive;
-                   }
                    bd.textstart = p + startcol;
                    if (yank_copy_line(&bd, y_idx) == FAIL)
                        goto fail;
@@ -4391,9 +4387,7 @@ skip_comment(
     {
        if (*comment_flags == COM_END
                || *comment_flags == ':')
-       {
            break;
-       }
        ++comment_flags;
     }
 
@@ -5851,9 +5845,7 @@ do_addsub(
            goto theend;
        ptr = buf1;
        if (negative && (!visual || was_positive))
-       {
            *ptr++ = '-';
-       }
        if (pre)
        {
            *ptr++ = '0';
index 8149521fc104a9e848819c7cc7547f4eab43fa8b..d1fdcc121eb1cd9ec91d1f51eef58d574dfba215 100644 (file)
@@ -6058,9 +6058,7 @@ did_set_string_option(
                || sandbox != 0
 #endif
                ) && (options[opt_idx].flags & P_SECURE))
-    {
        errmsg = e_secure;
-    }
 
     // Check for a "normal" directory or file name in some options.  Disallow a
     // path separator (slash and/or backslash), wildcards and characters that
@@ -6070,9 +6068,7 @@ did_set_string_option(
                            ? "/\\*?[|;&<>\r\n" : "/\\*?[<>\r\n")) != NULL)
          || ((options[opt_idx].flags & P_NDNAME)
                    && vim_strpbrk(*varp, (char_u *)"*?[|;&<>\r\n") != NULL))
-    {
        errmsg = e_invarg;
-    }
 
     /* 'term' */
     else if (varp == &T_NAME)
@@ -6722,9 +6718,7 @@ did_set_string_option(
                break;
            }
            if (*s == 'n')      /* name is always last one */
-           {
                break;
-           }
            else if (*s == 'r') /* skip until next ',' */
            {
                while (*++s && *s != ',')
@@ -8318,9 +8312,7 @@ set_bool_option(
 
     /* 'compatible' */
     if ((int *)varp == &p_cp)
-    {
        compatible_set();
-    }
 
 #ifdef FEAT_LANGMAP
     if ((int *)varp == &p_lrm)
@@ -8547,9 +8539,11 @@ set_bool_option(
 
     /* when 'textauto' is set or reset also change 'fileformats' */
     else if ((int *)varp == &p_ta)
+    {
        set_string_option_direct((char_u *)"ffs", -1,
                                 p_ta ? (char_u *)DFLT_FFS_VIM : (char_u *)"",
                                                     OPT_FREE | opt_flags, 0);
+    }
 
     /*
      * When 'lisp' option changes include/exclude '-' in
index ad5b60fd87d588178a19864bbf83688562f33cd6..bd70e84b7399ba6c320e977c7d92c01bfff63550 100644 (file)
@@ -1123,9 +1123,7 @@ vimSetDlgItemText(HWND hDlg, int nIDDlgItem, char_u *s)
     BOOL    ret;
 
     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
-    {
        wp = enc_to_utf16(s, NULL);
-    }
     if (wp != NULL)
     {
        ret = SetDlgItemTextW(hDlg, nIDDlgItem, wp);
@@ -1731,9 +1729,7 @@ mch_print_text_out(char_u *p, int len)
     int                wlen = len;
 
     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
-    {
        wp = enc_to_utf16(p, &wlen);
-    }
     if (wp != NULL)
     {
        int ret = FALSE;
index b121f3d70ed14efb9aa8ba18db97f43bbbf4ff4a..8091599ecdcae7b05722c238fcfa4a2ea92d4720 100644 (file)
@@ -95,9 +95,7 @@ clip_mch_request_selection(VimClipboard *cbd)
        }
 
        if ((clip_text != NULL) && (clip_length > 0))
-       {
            clip_yank_selection(type, clip_text, clip_length, cbd);
-       }
 
        PhClipboardPasteFinish(cbdata);
     }
index b3982979b18992b616f934bf3f0fb874f9111f68..8618499ea0e6d670700e258dad746443e5a2839f 100644 (file)
@@ -6119,9 +6119,7 @@ RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED, int *interrupted)
 # endif
 # ifdef FEAT_MOUSE_GPM
        if (gpm_idx >= 0 && (fds[gpm_idx].revents & POLLIN))
-       {
            *check_for_gpm = 1;
-       }
 # endif
 # ifdef USE_XSMP
        if (xsmp_idx >= 0 && (fds[xsmp_idx].revents & (POLLIN | POLLHUP)))
index 2912b0df75a30c1af352786b1eb5f1528fe6281f..fe729d4de20d3eabbf089b4e05fd92876e239f88 100644 (file)
@@ -2224,14 +2224,10 @@ ClearConsoleBuffer(WORD wAttribute)
     coord.Y = 0;
     if (!FillConsoleOutputCharacter(g_hConOut, ' ', NumCells,
            coord, &dummy))
-    {
        return FALSE;
-    }
     if (!FillConsoleOutputAttribute(g_hConOut, wAttribute, NumCells,
            coord, &dummy))
-    {
        return FALSE;
-    }
 
     return TRUE;
 }
@@ -2467,9 +2463,7 @@ RestoreConsoleBuffer(
                        cb->BufferSize,         /* dimensions of our buffer */
                        BufferCoord,            /* offset in our buffer */
                        &WriteRegion))          /* region to restore */
-           {
                return FALSE;
-           }
        }
     }
 
index 1e106359806556c58de4e68ae5b8ebe33d6bff2a..af7994c706c8d9fb4330d8b5d924006c3badd46f 100644 (file)
@@ -1790,8 +1790,7 @@ collection:
                        if (*regparse == 'n')
                            startc = (reg_string || emit_range
                                        || regparse[1] == '-') ? NL : NFA_NEWL;
-                       else
-                           if  (*regparse == 'd'
+                       else if (*regparse == 'd'
                                    || *regparse == 'o'
                                    || *regparse == 'x'
                                    || *regparse == 'u'
@@ -2919,14 +2918,10 @@ st_error(int *postfix UNUSED, int *end UNUSED, int *p UNUSED)
        }
 # else
        for (p2 = postfix; p2 < end; p2++)
-       {
            fprintf(df, "%d, ", *p2);
-       }
        fprintf(df, "\nCurrent position is: ");
        for (p2 = postfix; p2 <= p; p2 ++)
-       {
            fprintf(df, "%d, ", *p2);
-       }
 # endif
        fprintf(df, "\n--------------------------\n");
        fclose(df);
index 455c335aae1e6e6b6bb82f735ef786d65e8a22e6..e6bb33566088f11e848f80877c4f3dcb665c4fce 100644 (file)
@@ -232,9 +232,7 @@ redraw_all_later(int type)
     win_T      *wp;
 
     FOR_ALL_WINDOWS(wp)
-    {
        redraw_win_later(wp, type);
-    }
     // This may be needed when switching tabs.
     if (must_redraw < type)
        must_redraw = type;
@@ -3525,9 +3523,7 @@ win_line(
 #endif
             virtual_active() ||
             (VIsual_active && wp->w_buffer == curwin->w_buffer)))
-       {
            vcol = v;
-       }
 
        /* Handle a character that's not completely on the screen: Put ptr at
         * that character but skip the first few screen characters. */
@@ -10761,9 +10757,7 @@ showruler(int always)
 #endif
 #if defined(FEAT_STL_OPT)
     if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height)
-    {
        redraw_custom_statusline(curwin);
-    }
     else
 #endif
 #ifdef FEAT_CMDL_INFO
index a778896b461b82dcc0623f381c4f20d7afab072b..99283fc5216c3c91732ff2e5c6fb8d3cb7ca35b1 100644 (file)
@@ -445,9 +445,8 @@ spell_check(
     if (spell_iswordp(mi.mi_fend, wp))
     {
        do
-       {
            MB_PTR_ADV(mi.mi_fend);
-       while (*mi.mi_fend != NUL && spell_iswordp(mi.mi_fend, wp));
+       while (*mi.mi_fend != NUL && spell_iswordp(mi.mi_fend, wp));
 
        if (capcol != NULL && *capcol == 0 && wp->w_s->b_cap_prog != NULL)
        {
@@ -1463,9 +1462,8 @@ fold_more(matchinf_T *mip)
 
     p = mip->mi_fend;
     do
-    {
        MB_PTR_ADV(mip->mi_fend);
-    while (*mip->mi_fend != NUL && spell_iswordp(mip->mi_fend, mip->mi_win));
+    while (*mip->mi_fend != NUL && spell_iswordp(mip->mi_fend, mip->mi_win));
 
     /* Include the non-word character so that we can check for the word end. */
     if (*mip->mi_fend != NUL)
index 08df532f2f37747d757ed7aba256e756c9f1e11b..26e3deb47bb3d366166488f1ecd5683b5e56a37f 100644 (file)
@@ -4199,9 +4199,7 @@ f_term_dumpwrite(typval_T *argvars, typval_T *rettv UNUSED)
                if (cell.width != prev_cell.width || !same_attr)
                {
                    if (cell.width == 2)
-                   {
                        fputs("*", fd);
-                   }
                    else
                        fputs("+", fd);
 
index a4744722db263f5eb88dab6c31961bec55a1af2f..063dea0a599eb18c3fbfa9a8da2998e2faab6f73 100644 (file)
@@ -775,6 +775,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1086,
 /**/
     1085,
 /**/