home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.1 / 7.1.165 < prev    next >
Encoding:
Internet Message Format  |  2007-11-30  |  5.4 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.1.165
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.1.165
  11. Problem:    Crash related to getting X window ID. (Dominique Pelle)
  12. Solution:   Don't trust the window ID that we got in the past, check it every
  13.         time.
  14. Files:        src/os_unix.c
  15.  
  16.  
  17. *** ../vim-7.1.164/src/os_unix.c    Thu Aug 30 11:46:46 2007
  18. --- src/os_unix.c    Thu Nov 29 18:19:56 2007
  19. ***************
  20. *** 310,316 ****
  21.   }
  22.   
  23.   /*
  24. !  * mch_inchar(): low level input funcion.
  25.    * Get a characters from the keyboard.
  26.    * Return the number of characters that are available.
  27.    * If wtime == 0 do not wait for characters.
  28. --- 310,316 ----
  29.   }
  30.   
  31.   /*
  32. !  * mch_inchar(): low level input function.
  33.    * Get a characters from the keyboard.
  34.    * Return the number of characters that are available.
  35.    * If wtime == 0 do not wait for characters.
  36. ***************
  37. *** 1567,1584 ****
  38.   #ifdef FEAT_XCLIPBOARD
  39.       if (xterm_dpy != NULL && x11_window != 0)
  40.       {
  41. !     /* Checked it already. */
  42. !     if (x11_display_from == XD_XTERM)
  43. !         return OK;
  44. !     /*
  45. !      * If the X11 display was opened here before, for the window where Vim
  46. !      * was started, close that one now to avoid a memory leak.
  47. !      */
  48. !     if (x11_display_from == XD_HERE && x11_display != NULL)
  49. !         XCloseDisplay(x11_display);
  50. !     x11_display = xterm_dpy;
  51. !     x11_display_from = XD_XTERM;
  52.       if (test_x11_window(x11_display) == FAIL)
  53.       {
  54.           /* probably bad $WINDOWID */
  55. --- 1567,1585 ----
  56.   #ifdef FEAT_XCLIPBOARD
  57.       if (xterm_dpy != NULL && x11_window != 0)
  58.       {
  59. !     /* We may have checked it already, but Gnome terminal can move us to
  60. !      * another window, so we need to check every time. */
  61. !     if (x11_display_from != XD_XTERM)
  62. !     {
  63. !         /*
  64. !          * If the X11 display was opened here before, for the window where
  65. !          * Vim was started, close that one now to avoid a memory leak.
  66. !          */
  67. !         if (x11_display_from == XD_HERE && x11_display != NULL)
  68. !         XCloseDisplay(x11_display);
  69. !         x11_display = xterm_dpy;
  70. !         x11_display_from = XD_XTERM;
  71. !     }
  72.       if (test_x11_window(x11_display) == FAIL)
  73.       {
  74.           /* probably bad $WINDOWID */
  75. ***************
  76. *** 2421,2427 ****
  77.   /*
  78.    * Set the case of the file name, if it already exists.  This will cause the
  79.    * file name to remain exactly the same.
  80. !  * Only required for file systems where case is ingored and preserved.
  81.    */
  82.   /*ARGSUSED*/
  83.       void
  84. --- 2422,2428 ----
  85.   /*
  86.    * Set the case of the file name, if it already exists.  This will cause the
  87.    * file name to remain exactly the same.
  88. !  * Only required for file systems where case is ignored and preserved.
  89.    */
  90.   /*ARGSUSED*/
  91.       void
  92. ***************
  93. *** 4653,4659 ****
  94.       ret = poll(fds, nfd, towait);
  95.   # ifdef FEAT_MZSCHEME
  96.       if (ret == 0 && mzquantum_used)
  97. !         /* MzThreads scheduling is required and timeout occured */
  98.           finished = FALSE;
  99.   # endif
  100.   
  101. --- 4654,4660 ----
  102.       ret = poll(fds, nfd, towait);
  103.   # ifdef FEAT_MZSCHEME
  104.       if (ret == 0 && mzquantum_used)
  105. !         /* MzThreads scheduling is required and timeout occurred */
  106.           finished = FALSE;
  107.   # endif
  108.   
  109. ***************
  110. *** 4801,4807 ****
  111.   #endif
  112.   # ifdef FEAT_MZSCHEME
  113.       if (ret == 0 && mzquantum_used)
  114. !         /* loop if MzThreads must be scheduled and timeout occured */
  115.           finished = FALSE;
  116.   # endif
  117.   
  118. --- 4802,4808 ----
  119.   #endif
  120.   # ifdef FEAT_MZSCHEME
  121.       if (ret == 0 && mzquantum_used)
  122. !         /* loop if MzThreads must be scheduled and timeout occurred */
  123.           finished = FALSE;
  124.   # endif
  125.   
  126. ***************
  127. *** 5191,5197 ****
  128.       {
  129.           /* When using system() always add extra quotes, because the shell
  130.            * is started twice.  Otherwise put a backslash before special
  131. !          * characters, except insice ``. */
  132.   #ifdef USE_SYSTEM
  133.           STRCAT(command, " \"");
  134.           STRCAT(command, pat[i]);
  135. --- 5192,5198 ----
  136.       {
  137.           /* When using system() always add extra quotes, because the shell
  138.            * is started twice.  Otherwise put a backslash before special
  139. !          * characters, except inside ``. */
  140.   #ifdef USE_SYSTEM
  141.           STRCAT(command, " \"");
  142.           STRCAT(command, pat[i]);
  143. ***************
  144. *** 5675,5681 ****
  145.           /* gpm library tries to handling TSTP causes
  146.            * problems. Anyways, we close connection to Gpm whenever
  147.            * we are going to suspend or starting an external process
  148. !          * so we should'nt  have problem with this
  149.            */
  150.           signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL);
  151.           return 1; /* succeed */
  152. --- 5676,5682 ----
  153.           /* gpm library tries to handling TSTP causes
  154.            * problems. Anyways, we close connection to Gpm whenever
  155.            * we are going to suspend or starting an external process
  156. !          * so we shouldn't  have problem with this
  157.            */
  158.           signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL);
  159.           return 1; /* succeed */
  160. *** ../vim-7.1.164/src/version.c    Thu Nov 29 21:26:38 2007
  161. --- src/version.c    Sat Dec  1 17:17:20 2007
  162. ***************
  163. *** 668,669 ****
  164. --- 668,671 ----
  165.   {   /* Add new patch number below this line */
  166. + /**/
  167. +     165,
  168.   /**/
  169.  
  170. -- 
  171. "Hit any key to continue" is very confusing when you have two keyboards.
  172.  
  173.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  174. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  175. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  176.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  177.