4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Splitting quickfix window messes up window layout. (Marius
13 Solution: Compute the window size in a smarter way. (Martin Toft)
17 *** ../vim-7.1.059/src/window.c Sun Aug 5 18:49:07 2007
18 --- src/window.c Sun Aug 5 17:17:51 2007
21 if (wp->w_p_pvw || bt_quickfix(wp->w_buffer))
24 ! * The cursor goes to the preview or the quickfix window, try
25 * finding another window to go to.
29 if (wp->w_p_pvw || bt_quickfix(wp->w_buffer))
32 ! * If the cursor goes to the preview or the quickfix window, try
33 * finding another window to go to.
38 frame_T *frp, *frp2, *frp3;
39 frame_T *frp_close = win->w_frame;
44 * If there is only one window there is nothing to remove.
48 if (frp_close->fr_parent->fr_layout == FR_COL)
51 ! /* When 'winfixheight' is set, remember its old size and restore
52 ! * it later (it's a simplistic solution...). Don't do this if the
53 ! * window will occupy the full height of the screen. */
54 ! if (frp2->fr_win != NULL
55 ! && (frp2->fr_next != NULL || frp2->fr_prev != NULL)
56 ! && frp2->fr_win->w_p_wfh)
57 ! old_size = frp2->fr_win->w_height;
58 frame_new_height(frp2, frp2->fr_height + frp_close->fr_height,
59 frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE);
61 - win_setheight_win(old_size, frp2->fr_win);
67 ! /* When 'winfixwidth' is set, remember its old size and restore
68 ! * it later (it's a simplistic solution...). Don't do this if the
69 ! * window will occupy the full width of the screen. */
70 ! if (frp2->fr_win != NULL
71 ! && (frp2->fr_next != NULL || frp2->fr_prev != NULL)
72 ! && frp2->fr_win->w_p_wfw)
73 ! old_size = frp2->fr_win->w_width;
74 frame_new_width(frp2, frp2->fr_width + frp_close->fr_width,
75 frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE);
77 - win_setwidth_win(old_size, frp2->fr_win);
82 if (frp_close->fr_parent->fr_layout == FR_COL)
85 ! /* When 'winfixheight' is set, try to find another frame in the column
86 ! * (as close to the closed frame as possible) to distribute the height
88 ! if (frp2->fr_win != NULL && frp2->fr_win->w_p_wfh)
90 ! frp = frp_close->fr_prev;
91 ! frp3 = frp_close->fr_next;
92 ! while (frp != NULL || frp3 != NULL)
96 ! if (frp->fr_win != NULL && !frp->fr_win->w_p_wfh)
102 ! frp = frp->fr_prev;
106 ! if (frp3->fr_win != NULL && !frp3->fr_win->w_p_wfh)
112 ! frp3 = frp3->fr_next;
116 frame_new_height(frp2, frp2->fr_height + frp_close->fr_height,
117 frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE);
118 #ifdef FEAT_VERTSPLIT
123 ! /* When 'winfixwidth' is set, try to find another frame in the column
124 ! * (as close to the closed frame as possible) to distribute the width
126 ! if (frp2->fr_win != NULL && frp2->fr_win->w_p_wfw)
128 ! frp = frp_close->fr_prev;
129 ! frp3 = frp_close->fr_next;
130 ! while (frp != NULL || frp3 != NULL)
134 ! if (frp->fr_win != NULL && !frp->fr_win->w_p_wfw)
140 ! frp = frp->fr_prev;
144 ! if (frp3->fr_win != NULL && !frp3->fr_win->w_p_wfw)
150 ! frp3 = frp3->fr_next;
154 frame_new_width(frp2, frp2->fr_width + frp_close->fr_width,
155 frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE);
159 *** ../vim-7.1.059/src/version.c Fri Aug 10 21:32:41 2007
160 --- src/version.c Sat Aug 11 13:34:42 2007
164 { /* Add new patch number below this line */
170 hundred-and-one symptoms of being an internet addict:
171 117. You are more comfortable typing in html.
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 ///