Patch 8.2.1715

11 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 20, 2020, 3:14:43 PM9/20/20
to vim...@googlegroups.com

Patch 8.2.1715
Problem: Motif GUI: commented out code missed {}.
Solution: Add {} and reenable the code. (similar to #6989)
Files: src/gui_motif.c


*** ../vim-8.2.1714/src/gui_motif.c 2020-09-20 19:57:11.548720974 +0200
--- src/gui_motif.c 2020-09-20 21:09:17.142475502 +0200
***************
*** 1242,1252 ****
}
else
{
- # if 0 // DISABLED - this causes a crash when running "make test_gui" in
// Test_colorscheme()
if (menu->xpm_fname != NULL)
XtSetArg(args[n], XmNpixmapFile, menu->xpm_fname); n++;
! # endif
XtSetArg(args[n], XmNpixmapData, menu->xpm); n++;
XtSetArg(args[n], XmNlabelLocation, XmBOTTOM); n++;
}
--- 1242,1252 ----
}
else
{
// Test_colorscheme()
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++;
}
*** ../vim-8.2.1714/src/version.c 2020-09-20 21:04:31.811898396 +0200
--- src/version.c 2020-09-20 21:11:51.869702929 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1715,
/**/

--
Looking at Perl through Lisp glasses, Perl looks atrocious.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Christ van Willegen

unread,
Sep 21, 2020, 4:41:44 AM9/21/20
to vim...@googlegroups.com
Hi,

On Sun, Sep 20, 2020 at 9:14 PM Bram Moolenaar <Br...@moolenaar.net> wrote:
> }
> else
> {
> // Test_colorscheme()
> 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++;
> }

Writing this as

if (menu->xpm_fname != NULL)
XtSetArg(args[n++], XmNpixmapFile, menu->xpm_fname);
XtSetArg(args[n++], XmNpixmapData, menu->xpm);
XtSetArg(args[n++], XmNlabelLocation, XmBOTTOM);
}

would have been nicer in the first place, I think... No {} needed!

I assume that those are function calls!

Christ van Willegen

Bram Moolenaar

unread,
Sep 21, 2020, 8:35:34 AM9/21/20
to vim...@googlegroups.com, Christ van Willegen
The habit to put "n++;" at the end is they style commonly used for
Motif.

--
OLD WOMAN: King of the WHO?
ARTHUR: The Britons.
OLD WOMAN: Who are the Britons?
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Reply all
Reply to author
Forward
0 new messages