aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2006-06-13 23:07:56 +0000
committerRichard M. Stallman2006-06-13 23:07:56 +0000
commitc32de52a4f02cd411dea9620bf6d6770691238d7 (patch)
treea5d6d8cf0542868ecf09504d3a162823ef09fbae /src
parent946a79d0f7c71262aec6db474cac6050c4c29b7c (diff)
downloademacs-c32de52a4f02cd411dea9620bf6d6770691238d7.tar.gz
emacs-c32de52a4f02cd411dea9620bf6d6770691238d7.zip
(adjust_window_trailing_edge): Don't break out of the loop
because there's no next window, if there are parallel windows. Do break out when WINDOW is nil.
Diffstat (limited to 'src')
-rw-r--r--src/window.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/window.c b/src/window.c
index e0ea9beb211..6993f29e01d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4279,15 +4279,17 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
4279 { 4279 {
4280 Lisp_Object first_parallel = Qnil; 4280 Lisp_Object first_parallel = Qnil;
4281 4281
4282 p = XWINDOW (window); 4282 if (NILP (window))
4283 parent = p->parent;
4284
4285 if (NILP (XWINDOW (window)->next))
4286 { 4283 {
4284 /* This can happen if WINDOW on the previous iteration was
4285 at top level of the tree and we did not exit. */
4287 Fset_window_configuration (old_config); 4286 Fset_window_configuration (old_config);
4288 error ("No other window following this one"); 4287 error ("Specified window edge is fixed");
4289 } 4288 }
4290 4289
4290 p = XWINDOW (window);
4291 parent = p->parent;
4292
4291 /* See if this level has windows in parallel in the specified 4293 /* See if this level has windows in parallel in the specified
4292 direction. If so, set FIRST_PARALLEL to the first one. */ 4294 direction. If so, set FIRST_PARALLEL to the first one. */
4293 if (horiz_flag) 4295 if (horiz_flag)
@@ -4301,6 +4303,14 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
4301 first_parallel = XWINDOW (parent)->hchild; 4303 first_parallel = XWINDOW (parent)->hchild;
4302 } 4304 }
4303 4305
4306 /* If this level's succession is in the desired dimension,
4307 and this window is the last one, its trailing edge is fixed. */
4308 if (NILP (XWINDOW (window)->next) && NILP (first_parallel))
4309 {
4310 Fset_window_configuration (old_config);
4311 error ("Specified window edge is fixed");
4312 }
4313
4304 /* Don't make this window too small. */ 4314 /* Don't make this window too small. */
4305 if (XINT (CURSIZE (window)) + delta 4315 if (XINT (CURSIZE (window)) + delta
4306 < (horiz_flag ? window_min_width : window_min_height)) 4316 < (horiz_flag ? window_min_width : window_min_height))
@@ -4324,7 +4334,7 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
4324 we will fail and report an error, above.) */ 4334 we will fail and report an error, above.) */
4325 if (NILP (first_parallel)) 4335 if (NILP (first_parallel))
4326 { 4336 {
4327 if (!NILP (XWINDOW (window)->next)) 4337 if (!NILP (p->next))
4328 { 4338 {
4329 /* This may happen for the minibuffer. In that case 4339 /* This may happen for the minibuffer. In that case
4330 the window_deletion_count check below does not work. */ 4340 the window_deletion_count check below does not work. */