patch 8.1.1086: too many curly braces
Problem: Too many curly braces.
Solution: Remove curly braces where they are not needed. (Hirohito Higashi,
closes #3982)
diff --git a/src/autocmd.c b/src/autocmd.c
index 55650b4..d81615b 100644
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -517,9 +517,7 @@
}
vim_free(AUGROUP_NAME(i));
if (in_use)
- {
AUGROUP_NAME(i) = get_deleted_augroup();
- }
else
AUGROUP_NAME(i) = NULL;
}
diff --git a/src/buffer.c b/src/buffer.c
index 6cfa41f..33a7c66 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1595,9 +1595,7 @@
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 @@
/* 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));
diff --git a/src/crypt_zip.c b/src/crypt_zip.c
index ed17d95..864812e 100644
--- a/src/crypt_zip.c
+++ b/src/crypt_zip.c
@@ -68,12 +68,12 @@
/*
* 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 @@
zs->keys[1] = 591751049L;
zs->keys[2] = 878082192L;
for (p = key; *p != NUL; ++p)
- {
UPDATE_KEYS_ZIP(zs->keys, (int)*p);
- }
}
/*
diff --git a/src/dosinst.c b/src/dosinst.c
index 49a2fa4..2c05cf4 100644
--- a/src/dosinst.c
+++ b/src/dosinst.c
@@ -849,7 +849,7 @@
* 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 @@
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;
diff --git a/src/edit.c b/src/edit.c
index 0b5d0e8..d378cd1 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -5363,9 +5363,8 @@
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.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 524031e..2eafe14 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3568,9 +3568,7 @@
&& 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 @@
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 @@
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;
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 2544124..594abfc 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3361,9 +3361,7 @@
/* 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:
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index b253e9b..88d03ee 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8407,9 +8407,7 @@
|| cmdmod.browse
# endif
)
- {
RESET_BINDING(curwin);
- }
else
do_check_scrollbind(FALSE);
do_exedit(eap, old_curwin);
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 3d38d2c..52eda33 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1029,9 +1029,8 @@
/* 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 @@
if (*p == TAB)
{
do
- {
msg_putchar(' ');
- } while (++vcol % 8);
+ while (++vcol % 8);
++p;
}
else
@@ -2908,9 +2906,8 @@
{
/* Don't use chartabsize(), 'ts' can be different */
do
- {
msg_putchar(' ');
- } while (++vcol % 8);
+ while (++vcol % 8);
}
else
{
diff --git a/src/getchar.c b/src/getchar.c
index 0e9942b..e8926d4 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1813,9 +1813,8 @@
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
diff --git a/src/gui.c b/src/gui.c
index ada338f..15974e5 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3508,9 +3508,7 @@
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 @@
else
{
FOR_ALL_WINDOWS(wp)
- {
gui_do_scrollbar(wp, i, FALSE);
- }
}
curtab->tp_prev_which_scrollbars[i] = -1;
}
diff --git a/src/gui_gtk.c b/src/gui_gtk.c
index ba8fd9d..126eaf0 100644
--- a/src/gui_gtk.c
+++ b/src/gui_gtk.c
@@ -2573,9 +2573,7 @@
nonempty = (entry_text[0] != '\0');
if (dialog == find_widgets.dialog)
- {
gtk_widget_set_sensitive(find_widgets.find, nonempty);
- }
if (dialog == repl_widgets.dialog)
{
diff --git a/src/gui_mac.c b/src/gui_mac.c
index bfecf81..c177ee6 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -360,9 +360,7 @@
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 @@
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 @@
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 @@
/* 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 @@
/* SelectFont(hdc, gui.currFont); */
if (flags & DRAW_TRANSP)
- {
TextMode(srcOr);
- }
MoveTo(TEXT_X(col), TEXT_Y(row));
@@ -4620,13 +4604,9 @@
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 @@
/* 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;
diff --git a/src/gui_motif.c b/src/gui_motif.c
index 6eb618f..4217339 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -916,13 +916,9 @@
# 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 @@
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++;
}
diff --git a/src/gui_photon.c b/src/gui_photon.c
index 9401228..d773185 100644
--- a/src/gui_photon.c
+++ b/src/gui_photon.c
@@ -451,9 +451,7 @@
/* 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 @@
for (i = 0; i < num_panels; i++)
{
if (STRCMP(panel_titles[ i ], name) != 0)
- {
*s++ = panel_titles[ i ];
- }
}
num_panels--;
@@ -1334,9 +1330,7 @@
PtAppAddWorkProc(NULL, exit_gui_mch_update, &working);
while ((working == TRUE) && !vim_is_input_buf_full())
- {
PtProcessEvent();
- }
}
int
@@ -2408,9 +2402,7 @@
if (menu->iconidx >= 0 &&
(menu->iconidx < ARRAY_LENGTH(gui_ph_toolbar_images)))
- {
return gui_ph_toolbar_images[menu->iconidx];
- }
return NULL;
}
diff --git a/src/gui_w32.c b/src/gui_w32.c
index c4bc3c9..292fbdd 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1155,9 +1155,7 @@
/* 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 @@
}
}
if (wstr == NULL)
- {
TabCtrl_SetItem(s_tabhwnd, nr, &tie);
- }
}
/* Remove any old labels. */
@@ -4289,9 +4285,7 @@
}
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 @@
default:
#ifdef MSWIN_FIND_REPLACE
if (uMsg == s_findrep_msg && s_findrep_msg != 0)
- {
_OnFindRepl();
- }
#endif
return MyWindowProc(hwnd, uMsg, wParam, lParam);
}
diff --git a/src/gui_x11.c b/src/gui_x11.c
index ad91a21..6ff1644 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -3015,9 +3015,7 @@
if (e->type == PropertyNotify && e->window == commWindow
&& e->atom == commProperty && e->state == PropertyNewValue)
- {
serverEventProc(gui.dpy, event, 0);
- }
}
#endif
diff --git a/src/if_mzsch.c b/src/if_mzsch.c
index 27925af..a35d000 100644
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -3805,9 +3805,7 @@
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);
}
}
diff --git a/src/if_python3.c b/src/if_python3.c
index e8ab44f..d93d633 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -1236,9 +1236,7 @@
(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 @@
(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 @@
((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 @@
{
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 @@
((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
&start, &stop,
&step, &slicelen) < 0)
- {
return -1;
- }
return RangeAsSlice(self, start, stop, val);
}
else
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 63294f4..2727524 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -846,9 +846,7 @@
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 @@
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 @@
tv = eval_expr((char_u *)StringValuePtr(str), NULL);
if (tv == NULL)
- {
return Qnil;
- }
result = vim_to_ruby(tv);
free_tv(tv);
diff --git a/src/if_tcl.c b/src/if_tcl.c
index 46378a2..a5b80d4 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -811,9 +811,7 @@
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 @@
if (reflist->interp == interp && reflist->vimobj == vimobj)
{
if (reflist->delcmd)
- {
Tcl_DecrRefCount(reflist->delcmd);
- }
Tcl_IncrRefCount(delcmd);
reflist->delcmd = delcmd;
return TCL_OK;
diff --git a/src/indent.c b/src/indent.c
index 1ffa766..893ca29 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -3870,9 +3870,7 @@
// this must be the if that we want!
// match the indent level of that if.
if (elselevel <= 0 && whilelevel <= 0)
- {
return OK;
- }
}
}
return FAIL;
diff --git a/src/insexpand.c b/src/insexpand.c
index c646674..6373993 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -2606,9 +2606,7 @@
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;
diff --git a/src/libvterm/src/pen.c b/src/libvterm/src/pen.c
index b780095..7d8cdc3 100644
--- a/src/libvterm/src/pen.c
+++ b/src/libvterm/src/pen.c
@@ -385,12 +385,13 @@
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++]))
+ ;
}
}
diff --git a/src/macros.h b/src/macros.h
index 510be9b..571fed0 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -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))
@@ -240,7 +240,7 @@
/* 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))
@@ -251,7 +251,8 @@
# 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)
diff --git a/src/memline.c b/src/memline.c
index 66be0f3..6e5d3f2 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1359,9 +1359,7 @@
&& ((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 @@
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)
diff --git a/src/menu.c b/src/menu.c
index 41669ed..f71ede9 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1701,9 +1701,7 @@
{
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 @@
{
#ifdef FEAT_TERMINAL
if (term_use_loop())
- {
return MENU_INDEX_TERMINAL;
- }
#endif
if (VIsual_active)
{
diff --git a/src/misc1.c b/src/misc1.c
index 5781aa5..960f638 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1949,9 +1949,7 @@
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 @@
|| (*src == '%' && *tail != '%')
#endif
))
- {
*var++ = *tail++;
- }
}
#if defined(MSWIN) || defined(UNIX)
diff --git a/src/move.c b/src/move.c
index e678b87..232a875 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1614,9 +1614,7 @@
lp->height = 1;
else
#endif
- {
lp->height = PLINES_NOFILL(lp->lnum);
- }
}
}
diff --git a/src/netbeans.c b/src/netbeans.c
index e49797a..7c2ab42 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -1509,9 +1509,7 @@
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 @@
args = (char_u *)cp;
# ifdef NBDEBUG
if (vim_ignored != -1)
- {
nbdebug((" partial line annotation -- Not Yet Implemented!\n"));
- }
# endif
if (serNum >= GUARDEDOFFSET)
{
diff --git a/src/normal.c b/src/normal.c
index f99c7e3..6b3a78b 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -811,9 +811,7 @@
}
else if ((nv_cmds[idx].cmd_flags & NV_SSS)
&& (mod_mask & MOD_MASK_SHIFT))
- {
mod_mask &= ~MOD_MASK_SHIFT;
- }
}
}
@@ -3507,9 +3505,7 @@
&& col <= (int)startcol
&& find_is_eval_item(ptr + col, &col, &bn, FORWARD))
)
- {
++col;
- }
return col;
}
@@ -4329,9 +4325,7 @@
* 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 @@
v_swap_corners(cap->cmdchar);
#ifdef FEAT_JOB_CHANNEL
else if (bt_prompt(curbuf))
- {
clearopbeep(cap->oap);
- }
#endif
else
n_opencmd(cap);
diff --git a/src/ops.c b/src/ops.c
index 1b39c3f..e939f04 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -259,9 +259,7 @@
#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 @@
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 @@
{
if (*comment_flags == COM_END
|| *comment_flags == ':')
- {
break;
- }
++comment_flags;
}
@@ -5851,9 +5845,7 @@
goto theend;
ptr = buf1;
if (negative && (!visual || was_positive))
- {
*ptr++ = '-';
- }
if (pre)
{
*ptr++ = '0';
diff --git a/src/option.c b/src/option.c
index 8149521..d1fdcc1 100644
--- a/src/option.c
+++ b/src/option.c
@@ -6058,9 +6058,7 @@
|| 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 @@
? "/\\*?[|;&<>\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 @@
break;
}
if (*s == 'n') /* name is always last one */
- {
break;
- }
else if (*s == 'r') /* skip until next ',' */
{
while (*++s && *s != ',')
@@ -8318,9 +8312,7 @@
/* 'compatible' */
if ((int *)varp == &p_cp)
- {
compatible_set();
- }
#ifdef FEAT_LANGMAP
if ((int *)varp == &p_lrm)
@@ -8547,9 +8539,11 @@
/* 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
diff --git a/src/os_mswin.c b/src/os_mswin.c
index ad5b60f..bd70e84 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -1123,9 +1123,7 @@
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 @@
int wlen = len;
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
- {
wp = enc_to_utf16(p, &wlen);
- }
if (wp != NULL)
{
int ret = FALSE;
diff --git a/src/os_qnx.c b/src/os_qnx.c
index b121f3d..8091599 100644
--- a/src/os_qnx.c
+++ b/src/os_qnx.c
@@ -95,9 +95,7 @@
}
if ((clip_text != NULL) && (clip_length > 0))
- {
clip_yank_selection(type, clip_text, clip_length, cbd);
- }
PhClipboardPasteFinish(cbdata);
}
diff --git a/src/os_unix.c b/src/os_unix.c
index b398297..8618499 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -6119,9 +6119,7 @@
# 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)))
diff --git a/src/os_win32.c b/src/os_win32.c
index 2912b0d..fe729d4 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -2224,14 +2224,10 @@
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 @@
cb->BufferSize, /* dimensions of our buffer */
BufferCoord, /* offset in our buffer */
&WriteRegion)) /* region to restore */
- {
return FALSE;
- }
}
}
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 1e10635..af7994c 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -1790,8 +1790,7 @@
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 @@
}
# 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);
diff --git a/src/screen.c b/src/screen.c
index 455c335..e6bb335 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -232,9 +232,7 @@
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 @@
#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 @@
#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
diff --git a/src/spell.c b/src/spell.c
index a778896..99283fc 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -445,9 +445,8 @@
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 @@
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)
diff --git a/src/terminal.c b/src/terminal.c
index 08df532..26e3deb 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -4199,9 +4199,7 @@
if (cell.width != prev_cell.width || !same_attr)
{
if (cell.width == 2)
- {
fputs("*", fd);
- }
else
fputs("+", fd);
diff --git a/src/version.c b/src/version.c
index a474472..063dea0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -776,6 +776,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1086,
+/**/
1085,
/**/
1084,