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 / 6.0.075 < prev    next >
Encoding:
Internet Message Format  |  2001-11-04  |  8.5 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.075
  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 6.0.075
  11. Problem:    When closing a horizontally split window while 'eadirection' is
  12.         "hor" another horizontally split window is still resized. (Aron
  13.         Griffis)
  14. Solution:   Only resize windows in the same top frame as the window that is
  15.         split or closed.
  16. Files:        src/main.c, src/proto/window.pro, src/window.c
  17.  
  18.  
  19. *** ../vim60.74/src/main.c    Thu Nov  1 12:22:41 2001
  20. --- src/main.c    Mon Nov  5 09:29:34 2001
  21. ***************
  22. *** 1716,1722 ****
  23.   # endif
  24.       TIME_MSG("editing files in windows");
  25.       if (window_count > 1)
  26. !     win_equal(curwin, 'b');        /* adjust heights */
  27.   #endif /* FEAT_WINDOWS */
  28.   
  29.   #ifdef FEAT_DIFF
  30. --- 1716,1722 ----
  31.   # endif
  32.       TIME_MSG("editing files in windows");
  33.       if (window_count > 1)
  34. !     win_equal(curwin, FALSE, 'b');    /* adjust heights */
  35.   #endif /* FEAT_WINDOWS */
  36.   
  37.   #ifdef FEAT_DIFF
  38. *** ../vim60.74/src/proto/window.pro    Tue Sep 25 21:49:27 2001
  39. --- src/proto/window.pro    Mon Nov  5 09:29:09 2001
  40. ***************
  41. *** 5,11 ****
  42.   int win_count __ARGS((void));
  43.   int make_windows __ARGS((int count, int vertical));
  44.   void win_move_after __ARGS((win_T *win1, win_T *win2));
  45. ! void win_equal __ARGS((win_T *next_curwin, int dir));
  46.   void close_windows __ARGS((buf_T *buf));
  47.   void win_close __ARGS((win_T *win, int free_buf));
  48.   void close_others __ARGS((int message, int forceit));
  49. --- 5,11 ----
  50.   int win_count __ARGS((void));
  51.   int make_windows __ARGS((int count, int vertical));
  52.   void win_move_after __ARGS((win_T *win1, win_T *win2));
  53. ! void win_equal __ARGS((win_T *next_curwin, int current, int dir));
  54.   void close_windows __ARGS((buf_T *buf));
  55.   void win_close __ARGS((win_T *win, int free_buf));
  56.   void close_others __ARGS((int message, int forceit));
  57. *** ../vim60.74/src/window.c    Thu Nov  1 14:51:27 2001
  58. --- src/window.c    Mon Nov  5 09:49:44 2001
  59. ***************
  60. *** 25,31 ****
  61.   static void win_exchange __ARGS((long));
  62.   static void win_rotate __ARGS((int, int));
  63.   static void win_totop __ARGS((int size, int flags));
  64. ! static void win_equal_rec __ARGS((win_T *next_curwin, frame_T *topfr, int dir, int col, int row, int width, int height));
  65.   static win_T *winframe_remove __ARGS((win_T *win, int *dirp));
  66.   static frame_T *win_altframe __ARGS((win_T *win));
  67.   static win_T *frame2win __ARGS((frame_T *frp));
  68. --- 25,31 ----
  69.   static void win_exchange __ARGS((long));
  70.   static void win_rotate __ARGS((int, int));
  71.   static void win_totop __ARGS((int size, int flags));
  72. ! static void win_equal_rec __ARGS((win_T *next_curwin, int current, frame_T *topfr, int dir, int col, int row, int width, int height));
  73.   static win_T *winframe_remove __ARGS((win_T *win, int *dirp));
  74.   static frame_T *win_altframe __ARGS((win_T *win));
  75.   static win_T *frame2win __ARGS((frame_T *frp));
  76. ***************
  77. *** 367,373 ****
  78.   #ifdef FEAT_GUI
  79.           need_mouse_correct = TRUE;
  80.   #endif
  81. !         win_equal(NULL, 0);
  82.           break;
  83.   
  84.   /* increase current window height */
  85. --- 367,373 ----
  86.   #ifdef FEAT_GUI
  87.           need_mouse_correct = TRUE;
  88.   #endif
  89. !         win_equal(NULL, FALSE, 0);
  90.           break;
  91.   
  92.   /* increase current window height */
  93. ***************
  94. *** 1015,1021 ****
  95.        * make the new window the current window and redraw
  96.        */
  97.       if (do_equal || dir != 0)
  98. !     win_equal(wp,
  99.   #ifdef FEAT_VERTSPLIT
  100.           (flags & WSP_VERT) ? (dir == 'v' ? 'b' : 'h')
  101.           : dir == 'h' ? 'b' :
  102. --- 1015,1021 ----
  103.        * make the new window the current window and redraw
  104.        */
  105.       if (do_equal || dir != 0)
  106. !     win_equal(wp, TRUE,
  107.   #ifdef FEAT_VERTSPLIT
  108.           (flags & WSP_VERT) ? (dir == 'v' ? 'b' : 'h')
  109.           : dir == 'h' ? 'b' :
  110. ***************
  111. *** 1485,1492 ****
  112.    * rows.
  113.    */
  114.       void
  115. ! win_equal(next_curwin, dir)
  116.       win_T    *next_curwin;    /* pointer to current window to be or NULL */
  117.       int        dir;        /* 'v' for vertically, 'h' for horizontally,
  118.                      'b' for both, 0 for using p_ead */
  119.   {
  120. --- 1485,1493 ----
  121.    * rows.
  122.    */
  123.       void
  124. ! win_equal(next_curwin, current, dir)
  125.       win_T    *next_curwin;    /* pointer to current window to be or NULL */
  126. +     int        current;    /* do only frame with current window */
  127.       int        dir;        /* 'v' for vertically, 'h' for horizontally,
  128.                      'b' for both, 0 for using p_ead */
  129.   {
  130. ***************
  131. *** 1496,1503 ****
  132.   #else
  133.       dir = 'b';
  134.   #endif
  135. !     win_equal_rec(next_curwin == NULL ? curwin : next_curwin, topframe, dir,
  136. !                      0, 0, (int)Columns, topframe->fr_height);
  137.   }
  138.   
  139.   /*
  140. --- 1497,1504 ----
  141.   #else
  142.       dir = 'b';
  143.   #endif
  144. !     win_equal_rec(next_curwin == NULL ? curwin : next_curwin, current,
  145. !               topframe, dir, 0, 0, (int)Columns, topframe->fr_height);
  146.   }
  147.   
  148.   /*
  149. ***************
  150. *** 1507,1514 ****
  151.    * 'winheight' and 'winwidth' if possible.
  152.    */
  153.       static void
  154. ! win_equal_rec(next_curwin, topfr, dir, col, row, width, height)
  155.       win_T    *next_curwin;    /* pointer to current window to be or NULL */
  156.       frame_T    *topfr;        /* frame to set size off */
  157.       int        dir;        /* 'v', 'h' or 'b', see win_equal() */
  158.       int        col;        /* horizontal position for frame */
  159. --- 1508,1516 ----
  160.    * 'winheight' and 'winwidth' if possible.
  161.    */
  162.       static void
  163. ! win_equal_rec(next_curwin, current, topfr, dir, col, row, width, height)
  164.       win_T    *next_curwin;    /* pointer to current window to be or NULL */
  165. +     int        current;    /* do only frame with current window */
  166.       frame_T    *topfr;        /* frame to set size off */
  167.       int        dir;        /* 'v', 'h' or 'b', see win_equal() */
  168.       int        col;        /* horizontal position for frame */
  169. ***************
  170. *** 1616,1622 ****
  171.               new_size += next_curwin_size;
  172.           }
  173.           }
  174. !         win_equal_rec(next_curwin, fr, dir, col, row, new_size + n, height);
  175.           col += new_size + n;
  176.           width -= new_size + n;
  177.           if (n != m)        /* contains curwin */
  178. --- 1618,1631 ----
  179.               new_size += next_curwin_size;
  180.           }
  181.           }
  182. !         /* Skip frame that is full height when splitting or closing a
  183. !          * window, unless equalizing all frames. */
  184. !         if (!current || dir != 'v' || topfr->fr_parent != NULL
  185. !             || (new_size != fr->fr_width)
  186. !             || frame_has_win(fr, next_curwin))
  187. !         win_equal_rec(next_curwin, current, fr, dir, col, row,
  188. !                             new_size + n, height);
  189.           col += new_size + n;
  190.           width -= new_size + n;
  191.           if (n != m)        /* contains curwin */
  192. ***************
  193. *** 1766,1772 ****
  194.               room -= new_size;
  195.           new_size += n;
  196.           }
  197. !         win_equal_rec(next_curwin, fr, dir, col, row, width, new_size);
  198.           row += new_size;
  199.           height -= new_size;
  200.           totwincount -= wincount;
  201. --- 1775,1787 ----
  202.               room -= new_size;
  203.           new_size += n;
  204.           }
  205. !         /* Skip frame that is full width when splitting or closing a
  206. !          * window, unless equalizing all frames. */
  207. !         if (!current || dir != 'h' || topfr->fr_parent != NULL
  208. !             || (new_size != fr->fr_height)
  209. !             || frame_has_win(fr, next_curwin))
  210. !         win_equal_rec(next_curwin, current, fr, dir, col, row,
  211. !                                  width, new_size);
  212.           row += new_size;
  213.           height -= new_size;
  214.           totwincount -= wincount;
  215. ***************
  216. *** 1906,1912 ****
  217.       close_curwin = TRUE;
  218.       }
  219.       if (p_ea)
  220. !     win_equal(curwin,
  221.   #ifdef FEAT_VERTSPLIT
  222.           dir
  223.   #else
  224. --- 1921,1927 ----
  225.       close_curwin = TRUE;
  226.       }
  227.       if (p_ea)
  228. !     win_equal(curwin, TRUE,
  229.   #ifdef FEAT_VERTSPLIT
  230.           dir
  231.   #else
  232. ***************
  233. *** 3199,3205 ****
  234.   #if 0
  235.       /* Disabled: don't want making the screen smaller make a window larger. */
  236.       if (p_ea)
  237. !     win_equal(curwin, 'v');
  238.   #endif
  239.   }
  240.   
  241. --- 3214,3220 ----
  242.   #if 0
  243.       /* Disabled: don't want making the screen smaller make a window larger. */
  244.       if (p_ea)
  245. !     win_equal(curwin, FALSE, 'v');
  246.   #endif
  247.   }
  248.   
  249. ***************
  250. *** 3217,3223 ****
  251.   #if 0
  252.       /* Disabled: don't want making the screen smaller make a window larger. */
  253.       if (p_ea)
  254. !     win_equal(curwin, 'h');
  255.   #endif
  256.   }
  257.   #endif
  258. --- 3232,3238 ----
  259.   #if 0
  260.       /* Disabled: don't want making the screen smaller make a window larger. */
  261.       if (p_ea)
  262. !     win_equal(curwin, FALSE, 'h');
  263.   #endif
  264.   }
  265.   #endif
  266. *** ../vim60.74/src/version.c    Mon Nov  5 09:00:25 2001
  267. --- src/version.c    Mon Nov  5 09:41:37 2001
  268. ***************
  269. *** 608,609 ****
  270. --- 608,611 ----
  271.   {   /* Add new patch number below this line */
  272. + /**/
  273. +     75,
  274.   /**/
  275.  
  276. -- 
  277. Imagine a world without hypothetical situations.
  278.  
  279.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  280. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  281.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  282.