]>
Commit | Line | Data |
---|---|---|
6577e359 | 1 | To: vim-dev@vim.org |
2 | Subject: patch 7.1.060 | |
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.060 | |
11 | Problem: Splitting quickfix window messes up window layout. (Marius | |
12 | Gedminas) | |
13 | Solution: Compute the window size in a smarter way. (Martin Toft) | |
14 | Files: src/window.c | |
15 | ||
16 | ||
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 | |
19 | *************** | |
20 | *** 2121,2127 **** | |
21 | if (wp->w_p_pvw || bt_quickfix(wp->w_buffer)) | |
22 | { | |
23 | /* | |
24 | ! * The cursor goes to the preview or the quickfix window, try | |
25 | * finding another window to go to. | |
26 | */ | |
27 | for (;;) | |
28 | --- 2121,2127 ---- | |
29 | if (wp->w_p_pvw || bt_quickfix(wp->w_buffer)) | |
30 | { | |
31 | /* | |
32 | ! * If the cursor goes to the preview or the quickfix window, try | |
33 | * finding another window to go to. | |
34 | */ | |
35 | for (;;) | |
36 | *************** | |
37 | *** 2308,2314 **** | |
38 | frame_T *frp, *frp2, *frp3; | |
39 | frame_T *frp_close = win->w_frame; | |
40 | win_T *wp; | |
41 | - int old_size = 0; | |
42 | ||
43 | /* | |
44 | * If there is only one window there is nothing to remove. | |
45 | --- 2308,2313 ---- | |
46 | *************** | |
47 | *** 2329,2361 **** | |
48 | if (frp_close->fr_parent->fr_layout == FR_COL) | |
49 | { | |
50 | #endif | |
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); | |
60 | - if (old_size != 0) | |
61 | - win_setheight_win(old_size, frp2->fr_win); | |
62 | #ifdef FEAT_VERTSPLIT | |
63 | *dirp = 'v'; | |
64 | } | |
65 | else | |
66 | { | |
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); | |
76 | - if (old_size != 0) | |
77 | - win_setwidth_win(old_size, frp2->fr_win); | |
78 | *dirp = 'h'; | |
79 | } | |
80 | #endif | |
81 | --- 2328,2404 ---- | |
82 | if (frp_close->fr_parent->fr_layout == FR_COL) | |
83 | { | |
84 | #endif | |
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 | |
87 | ! * to. */ | |
88 | ! if (frp2->fr_win != NULL && frp2->fr_win->w_p_wfh) | |
89 | ! { | |
90 | ! frp = frp_close->fr_prev; | |
91 | ! frp3 = frp_close->fr_next; | |
92 | ! while (frp != NULL || frp3 != NULL) | |
93 | ! { | |
94 | ! if (frp != NULL) | |
95 | ! { | |
96 | ! if (frp->fr_win != NULL && !frp->fr_win->w_p_wfh) | |
97 | ! { | |
98 | ! frp2 = frp; | |
99 | ! wp = frp->fr_win; | |
100 | ! break; | |
101 | ! } | |
102 | ! frp = frp->fr_prev; | |
103 | ! } | |
104 | ! if (frp3 != NULL) | |
105 | ! { | |
106 | ! if (frp3->fr_win != NULL && !frp3->fr_win->w_p_wfh) | |
107 | ! { | |
108 | ! frp2 = frp3; | |
109 | ! wp = frp3->fr_win; | |
110 | ! break; | |
111 | ! } | |
112 | ! frp3 = frp3->fr_next; | |
113 | ! } | |
114 | ! } | |
115 | ! } | |
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 | |
119 | *dirp = 'v'; | |
120 | } | |
121 | else | |
122 | { | |
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 | |
125 | ! * to. */ | |
126 | ! if (frp2->fr_win != NULL && frp2->fr_win->w_p_wfw) | |
127 | ! { | |
128 | ! frp = frp_close->fr_prev; | |
129 | ! frp3 = frp_close->fr_next; | |
130 | ! while (frp != NULL || frp3 != NULL) | |
131 | ! { | |
132 | ! if (frp != NULL) | |
133 | ! { | |
134 | ! if (frp->fr_win != NULL && !frp->fr_win->w_p_wfw) | |
135 | ! { | |
136 | ! frp2 = frp; | |
137 | ! wp = frp->fr_win; | |
138 | ! break; | |
139 | ! } | |
140 | ! frp = frp->fr_prev; | |
141 | ! } | |
142 | ! if (frp3 != NULL) | |
143 | ! { | |
144 | ! if (frp3->fr_win != NULL && !frp3->fr_win->w_p_wfw) | |
145 | ! { | |
146 | ! frp2 = frp3; | |
147 | ! wp = frp3->fr_win; | |
148 | ! break; | |
149 | ! } | |
150 | ! frp3 = frp3->fr_next; | |
151 | ! } | |
152 | ! } | |
153 | ! } | |
154 | frame_new_width(frp2, frp2->fr_width + frp_close->fr_width, | |
155 | frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE); | |
156 | *dirp = 'h'; | |
157 | } | |
158 | #endif | |
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 | |
161 | *************** | |
162 | *** 668,669 **** | |
163 | --- 668,671 ---- | |
164 | { /* Add new patch number below this line */ | |
165 | + /**/ | |
166 | + 60, | |
167 | /**/ | |
168 | ||
169 | -- | |
170 | hundred-and-one symptoms of being an internet addict: | |
171 | 117. You are more comfortable typing in html. | |
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 /// |