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.2 / 7.2.446 < prev    next >
Encoding:
Internet Message Format  |  2010-07-11  |  2.3 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.2.446
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.2.446
  11. Problem:    Crash in GUI when closing the last window in a tabpage. (ryo7000)
  12. Solution:   Remove the tabpage from the list before freeing the window.
  13. Files:        src/window.c
  14.  
  15.  
  16. *** ../vim-7.2.445/src/window.c    2010-03-17 16:54:51.000000000 +0100
  17. --- src/window.c    2010-07-11 13:18:31.000000000 +0200
  18. ***************
  19. *** 2304,2309 ****
  20. --- 2304,2310 ----
  21.       win_T    *wp;
  22.       int        dir;
  23.       tabpage_T   *ptp = NULL;
  24. +     int        free_tp = FALSE;
  25.   
  26.       /* Close the link to the buffer. */
  27.       close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0);
  28. ***************
  29. *** 2321,2331 ****
  30.       if (wp == NULL)
  31.       return;
  32.   
  33. -     /* Free the memory used for the window. */
  34. -     wp = win_free_mem(win, &dir, tp);
  35.       /* When closing the last window in a tab page remove the tab page. */
  36. !     if (wp == NULL)
  37.       {
  38.       if (tp == first_tabpage)
  39.           first_tabpage = tp->tp_next;
  40. --- 2322,2329 ----
  41.       if (wp == NULL)
  42.       return;
  43.   
  44.       /* When closing the last window in a tab page remove the tab page. */
  45. !     if (tp == NULL ? firstwin == lastwin : tp->tp_firstwin == tp->tp_lastwin)
  46.       {
  47.       if (tp == first_tabpage)
  48.           first_tabpage = tp->tp_next;
  49. ***************
  50. *** 2341,2348 ****
  51.           }
  52.           ptp->tp_next = tp->tp_next;
  53.       }
  54. !     free_tabpage(tp);
  55.       }
  56.   }
  57.   
  58.   /*
  59. --- 2339,2352 ----
  60.           }
  61.           ptp->tp_next = tp->tp_next;
  62.       }
  63. !     free_tp = TRUE;
  64.       }
  65. +     /* Free the memory used for the window. */
  66. +     win_free_mem(win, &dir, tp);
  67. +     if (free_tp)
  68. +     free_tabpage(tp);
  69.   }
  70.   
  71.   /*
  72. *** ../vim-7.2.445/src/version.c    2010-07-07 18:20:21.000000000 +0200
  73. --- src/version.c    2010-07-12 21:36:05.000000000 +0200
  74. ***************
  75. *** 683,684 ****
  76. --- 683,686 ----
  77.   {   /* Add new patch number below this line */
  78. + /**/
  79. +     446,
  80.   /**/
  81.  
  82. -- 
  83. Not too long ago, compress was something you did to garbage...
  84.  
  85.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  86. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  87. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  88.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  89.