changeset: 4469:c32b3d10c56b202091a1abe4ad924db6535e847b
user: Mike Sperber <sperber(a)deinprogramm.de>
date: Sat Apr 26 16:28:44 2008 +0200
files: src/ChangeLog src/window.c
description:
Fix problem with `resize-minibuffer-mode'.
2008-04-26 Mike Sperber <mike(a)xemacs.org>
* window.c (set_window_pixsize): Round up when we're shrinking,
down when we're growing * to make sure that pairs of grow / shrink
meant to * cancel out actually do cancel out. This fixes a
problem with `resize-minibuffer-mode' where successive grow/shrink
actions are meant to cancel out, but previously didn't.
diff -r 1d41b9bcf74f7ed4ab6e296322a182fe580a95a2 -r
c32b3d10c56b202091a1abe4ad924db6535e847b src/ChangeLog
--- a/src/ChangeLog Sun Apr 13 11:18:00 2008 +0200
+++ b/src/ChangeLog Sat Apr 26 16:28:44 2008 +0200
@@ -1,3 +1,11 @@ 2008-04-05 Aidan Kehoe <kehoea@parhasa
+2008-04-26 Mike Sperber <mike(a)xemacs.org>
+
+ * window.c (set_window_pixsize): Round up when we're shrinking,
+ down when we're growing * to make sure that pairs of grow / shrink
+ meant to * cancel out actually do cancel out. This fixes a
+ problem with `resize-minibuffer-mode' where successive grow/shrink
+ actions are meant to cancel out, but previously didn't.
+
2008-04-05 Aidan Kehoe <kehoea(a)parhasard.net>
* depend:
diff -r 1d41b9bcf74f7ed4ab6e296322a182fe580a95a2 -r
c32b3d10c56b202091a1abe4ad924db6535e847b src/window.c
--- a/src/window.c Sun Apr 13 11:18:00 2008 +0200
+++ b/src/window.c Sat Apr 26 16:28:44 2008 +0200
@@ -3601,7 +3601,17 @@ set_window_pixsize (Lisp_Object window,
/* All but the last window should have a height which is
a multiple of the default line height. */
if (!NILP (c->next))
- pos = (pos / line_size) * line_size;
+ {
+ /*
+ * Round up when we're shrinking, down when we're growing
+ * to make sure that pairs of grow / shrink meant to
+ * cancel out actually do cancel out.
+ */
+ if (pixel_adj_left < 0)
+ pos = ((pos + line_size -1) / line_size) * line_size;
+ else
+ pos = (pos / line_size) * line_size;
+ }
/* Avoid confusion: don't delete child if it becomes too small */
set_window_pixsize (child, pos + first - last_pos, 1, set_height);
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches