patch 8.2.4649: various formatting problems
Problem: Various formatting problems.
Solution: Improve the code formatting.
diff --git a/src/gui_athena.c b/src/gui_athena.c
index 6cbabf8..8b5af63 100644
--- a/src/gui_athena.c
+++ b/src/gui_athena.c
@@ -1191,7 +1191,7 @@
#endif
menu->parent = parent;
- menu->submenu_id = NULL;
+ menu->submenu_id = (Widget)0;
if (!XtIsManaged(toolBar)
&& vim_strchr(p_go, GO_TOOLBAR) != NULL)
gui_mch_show_toolbar(TRUE);
diff --git a/src/gui_motif.c b/src/gui_motif.c
index 56d3f35..97b0bf9 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -944,13 +944,21 @@
&& tearoff_val == (int)XmTEAR_OFF_ENABLED ? 1 : 0),
#endif
NULL);
- gui_motif_menu_colors(menu->id);
- gui_motif_menu_fontlist(menu->id);
XmStringFree(label);
if (menu->id == (Widget)0) // failed
return;
+ // The "Help" menu is a special case, and should be placed at the far
+ // right hand side of the menu-bar. It's recognized by its high priority.
+ if (parent == NULL && menu->priority >= 9999)
+ XtVaSetValues(menuBar,
+ XmNmenuHelpWidget, menu->id,
+ NULL);
+
+ gui_motif_menu_colors(menu->id);
+ gui_motif_menu_fontlist(menu->id);
+
// add accelerator text
gui_motif_add_actext(menu);
@@ -978,19 +986,8 @@
XmNsubMenuId, menu->submenu_id,
NULL);
- /*
- * The "Help" menu is a special case, and should be placed at the far
- * right hand side of the menu-bar. It's recognized by its high priority.
- */
- if (parent == NULL && menu->priority >= 9999)
- XtVaSetValues(menuBar,
- XmNmenuHelpWidget, menu->id,
- NULL);
-
- /*
- * When we add a top-level item to the menu bar, we can figure out how
- * high the menu bar should be.
- */
+ // When we add a top-level item to the menu bar, we can figure out how
+ // high the menu bar should be.
if (parent == NULL)
gui_mch_compute_menu_height(menu->id);
}
diff --git a/src/mark.c b/src/mark.c
index 11f20a6..fbb4b9a 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -1002,21 +1002,21 @@
void
mark_adjust_nofold(
- linenr_T line1,
- linenr_T line2,
- long amount,
- long amount_after)
+ linenr_T line1,
+ linenr_T line2,
+ long amount,
+ long amount_after)
{
mark_adjust_internal(line1, line2, amount, amount_after, FALSE);
}
static void
mark_adjust_internal(
- linenr_T line1,
- linenr_T line2,
- long amount,
- long amount_after,
- int adjust_folds UNUSED)
+ linenr_T line1,
+ linenr_T line2,
+ long amount,
+ long amount_after,
+ int adjust_folds UNUSED)
{
int i;
int fnum = curbuf->b_fnum;
diff --git a/src/os_unix.c b/src/os_unix.c
index 5b516e0..826c9c0 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3762,7 +3762,7 @@
static int mouse_ison = FALSE;
/*
- * Set mouse clicks on or off.
+ * Set mouse clicks on or off and possible enable mouse movement events.
*/
void
mch_setmouse(int on)
diff --git a/src/quickfix.c b/src/quickfix.c
index 0b6a5a3..c2162e9 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -3194,6 +3194,7 @@
if (qfl_type == QFLT_LOCATION)
{
win_T *wp = win_id2wp(prev_winid);
+
if (wp == NULL && curwin->w_llist != qi)
{
emsg(_(e_current_window_was_closed));
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 4d95f83..503895e 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -6764,8 +6764,10 @@
case NFA_MARK_GT:
case NFA_MARK_LT:
{
- size_t col = rex.input - rex.line;
- pos_T *pos = getmark_buf(rex.reg_buf, t->state->val, FALSE);
+ pos_T *pos;
+ size_t col = REG_MULTI ? rex.input - rex.line : 0;
+
+ pos = getmark_buf(rex.reg_buf, t->state->val, FALSE);
// Line may have been freed, get it again.
if (REG_MULTI)
diff --git a/src/register.c b/src/register.c
index 89d4232..79e6021 100644
--- a/src/register.c
+++ b/src/register.c
@@ -2399,8 +2399,8 @@
msg_puts_attr("^J", attr);
n -= 2;
}
- for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0;
- ++p)
+ for (p = yb->y_array[j];
+ *p != NUL && (n -= ptr2cells(p)) >= 0; ++p)
{
clen = (*mb_ptr2len)(p);
msg_outtrans_len(p, clen);
diff --git a/src/testdir/test_filechanged.vim b/src/testdir/test_filechanged.vim
index ee9e80b..5dca43f 100644
--- a/src/testdir/test_filechanged.vim
+++ b/src/testdir/test_filechanged.vim
@@ -139,8 +139,7 @@
func Test_FileChangedShell_edit_dialog()
CheckNotGui
- " FIXME: why does this not work on MS-Windows?
- CheckUnix
+ CheckUnix " Using low level feedkeys() does not work on MS-Windows.
new Xchanged_r
call setline(1, 'reload this')
diff --git a/src/version.c b/src/version.c
index 15cbdf8..8b188ce 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4649,
+/**/
4648,
/**/
4647,