Patch 8.2.2674
Problem:    Motif: cancelling the font dialog resets the font.
Solution:   When no font is selected to not change the font. (closes #7825,
            closes #8035)  Fix compiler warnings.
Files:      src/gui_x11.c, src/gui_motif.c


*** ../vim-8.2.2673/src/gui_x11.c       2020-12-30 13:14:41.950441890 +0100
--- src/gui_x11.c       2021-03-29 20:08:08.300615752 +0200
***************
*** 1753,1759 ****
--- 1753,1765 ----
      // A font name equal "*" is indicating, that we should activate the font
      // selection dialogue to get a new font name. So let us do it here.
      if (font_name != NULL && STRCMP(font_name, "*") == 0)
+     {
        font_name = gui_xm_select_font(hl_get_font_name());
+ 
+       // Do not reset to default font except on GUI startup.
+       if (font_name == NULL && !gui.starting)
+           return OK;
+     }
  #endif
  
  #ifdef FEAT_XFONTSET
*** ../vim-8.2.2673/src/gui_motif.c     2021-01-03 22:12:11.966284913 +0100
--- src/gui_motif.c     2021-03-29 20:08:02.484630311 +0200
***************
*** 1996,2002 ****
   * Callback routine for dialog mnemonic processing.
   */
      static void
! mnemonic_event(Widget w, XtPointer call_data UNUSED, XKeyEvent *event)
  {
      do_mnemonic(w, event->keycode);
  }
--- 1996,2006 ----
   * Callback routine for dialog mnemonic processing.
   */
      static void
! mnemonic_event(
!       Widget      w,
!       XtPointer   call_data UNUSED,
!       XKeyEvent   *event,
!       Boolean     *b UNUSED)
  {
      do_mnemonic(w, event->keycode);
  }
***************
*** 3565,3571 ****
  find_replace_keypress(
      Widget            w UNUSED,
      SharedFindReplace *frdp,
!     XKeyEvent         *event)
  {
      KeySym keysym;
  
--- 3569,3576 ----
  find_replace_keypress(
      Widget            w UNUSED,
      SharedFindReplace *frdp,
!     XKeyEvent         *event,
!     Boolean           *b UNUSED)
  {
      KeySym keysym;
  
*** ../vim-8.2.2673/src/version.c       2021-03-28 21:14:02.262994184 +0200
--- src/version.c       2021-03-29 19:42:57.304530405 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2674,
  /**/

-- 
Have you heard about the new Beowulf cluster? It's so fast, it executes
an infinite loop in 6 seconds.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202103291811.12TIBGVI1211840%40masaka.moolenaar.net.

Raspunde prin e-mail lui