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.0 / 7.0.240 < prev    next >
Encoding:
Internet Message Format  |  2007-05-01  |  2.7 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 7.0.240
  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.0.240
  11. Problem:    Crash when splitting a window in the GUI. (opposite of 7.0.227)
  12. Solution:   Don't call out_flush() from win_alloc().  Also avoid this for
  13.         win_delete().  Also block autocommands while the window structure
  14.         is invalid.
  15. Files:        src/window.c
  16.  
  17.  
  18. *** ../vim-7.0.239/src/window.c    Thu Apr 26 16:11:47 2007
  19. --- src/window.c    Tue May  1 19:23:22 2007
  20. ***************
  21. *** 722,727 ****
  22. --- 722,733 ----
  23.       need_status = STATUS_HEIGHT;
  24.       }
  25.   
  26. + #ifdef FEAT_GUI
  27. +     /* May be needed for the scrollbars that are going to change. */
  28. +     if (gui.in_use)
  29. +     out_flush();
  30. + #endif
  31.   #ifdef FEAT_VERTSPLIT
  32.       if (flags & WSP_VERT)
  33.       {
  34. ***************
  35. *** 4071,4076 ****
  36. --- 4077,4088 ----
  37.   
  38.       if (newwin != NULL)
  39.       {
  40. + #ifdef FEAT_AUTOCMD
  41. +     /* Don't execute autocommands while the window is not properly
  42. +      * initialized yet.  gui_create_scrollbar() may trigger a FocusGained
  43. +      * event. */
  44. +     ++autocmd_block;
  45. + #endif
  46.       /*
  47.        * link the window in the window list
  48.        */
  49. ***************
  50. *** 4100,4106 ****
  51.   #ifdef FEAT_GUI
  52.       if (gui.in_use)
  53.       {
  54. -         out_flush();
  55.           gui_create_scrollbar(&newwin->w_scrollbars[SBAR_LEFT],
  56.               SBAR_LEFT, newwin);
  57.           gui_create_scrollbar(&newwin->w_scrollbars[SBAR_RIGHT],
  58. --- 4112,4117 ----
  59. ***************
  60. *** 4114,4119 ****
  61. --- 4125,4133 ----
  62.   #ifdef FEAT_FOLDING
  63.       foldInitWin(newwin);
  64.   #endif
  65. + #ifdef FEAT_AUTOCMD
  66. +     --autocmd_block;
  67. + #endif
  68.       }
  69.       return newwin;
  70.   }
  71. ***************
  72. *** 4130,4135 ****
  73. --- 4144,4155 ----
  74.   {
  75.       int        i;
  76.   
  77. + #ifdef FEAT_AUTOCMD
  78. +     /* Don't execute autocommands while the window is halfway being deleted.
  79. +      * gui_mch_destroy_scrollbar() may trigger a FocusGained event. */
  80. +     ++autocmd_block;
  81. + #endif
  82.   #ifdef FEAT_MZSCHEME
  83.       mzscheme_window_free(wp);
  84.   #endif
  85. ***************
  86. *** 4188,4193 ****
  87. --- 4208,4217 ----
  88.   
  89.       win_remove(wp, tp);
  90.       vim_free(wp);
  91. + #ifdef FEAT_AUTOCMD
  92. +     --autocmd_block;
  93. + #endif
  94.   }
  95.   
  96.   /*
  97. *** ../vim-7.0.239/src/version.c    Tue May  1 23:22:32 2007
  98. --- src/version.c    Wed May  2 21:51:10 2007
  99. ***************
  100. *** 668,669 ****
  101. --- 668,671 ----
  102.   {   /* Add new patch number below this line */
  103. + /**/
  104. +     240,
  105.   /**/
  106.  
  107. -- 
  108. Just remember...if the world didn't suck, we'd all fall off.
  109.  
  110.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  111. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  112. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  113.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  114.