]> code.delx.au - gnu-emacs/commitdiff
Fix crashes when mini-window has non-zero margins
authorEli Zaretskii <eliz@gnu.org>
Fri, 15 Jan 2016 15:07:38 +0000 (17:07 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 15 Jan 2016 15:07:38 +0000 (17:07 +0200)
* src/window.c (resize_frame_windows): Use 'new_size' to set
minibuffer window's 'total_cols' value, as 'size' might be in
pixels.  (Bug#22356)

src/window.c

index bb414e7d31153614918fabcff84670ecbfe172ee..bbe47c7255a302d493e72ff496178ae211ec5bc4 100644 (file)
@@ -3970,9 +3970,11 @@ values.  */)
 }
 
 
-/* Resize frame F's windows when number of lines of F is set to SIZE.
-   HORFLAG means resize windows when number of columns of F is set to
-   SIZE.  PIXELWISE means to interpret SIZE as pixels.  */
+/* Resize frame F's windows when F's width or height is set to SIZE.
+   If HORFLAG is zero, F's width was set to SIZE, otherwise its height
+   was set.  SIZE is interpreted in F's canonical character units
+   (a.k.a. "columns" or "lines"), unless PIXELWISE is non-zero, which
+   means to interpret SIZE in pixel units.  */
 void
 resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
 {
@@ -4073,7 +4075,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
       m = XWINDOW (mini);
       if (horflag)
        {
-         m->total_cols = size;
+         m->total_cols = new_size;
          m->pixel_width = new_pixel_size;
        }
       else