diff options
| author | Eli Zaretskii | 2016-01-15 17:07:38 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-01-15 17:07:38 +0200 |
| commit | aa636c8465b03c09249dccd68fca3d1df04eaa2c (patch) | |
| tree | 1a784a482a18a7224c18b01db5c73c633d5bb6b6 /src/window.c | |
| parent | 016b3d5894b8c424eab262aeefc646c6cd03a70a (diff) | |
| download | emacs-aa636c8465b03c09249dccd68fca3d1df04eaa2c.tar.gz emacs-aa636c8465b03c09249dccd68fca3d1df04eaa2c.zip | |
Fix crashes when mini-window has non-zero margins
* 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)
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c index bb414e7d311..bbe47c7255a 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3970,9 +3970,11 @@ values. */) | |||
| 3970 | } | 3970 | } |
| 3971 | 3971 | ||
| 3972 | 3972 | ||
| 3973 | /* Resize frame F's windows when number of lines of F is set to SIZE. | 3973 | /* Resize frame F's windows when F's width or height is set to SIZE. |
| 3974 | HORFLAG means resize windows when number of columns of F is set to | 3974 | If HORFLAG is zero, F's width was set to SIZE, otherwise its height |
| 3975 | SIZE. PIXELWISE means to interpret SIZE as pixels. */ | 3975 | was set. SIZE is interpreted in F's canonical character units |
| 3976 | (a.k.a. "columns" or "lines"), unless PIXELWISE is non-zero, which | ||
| 3977 | means to interpret SIZE in pixel units. */ | ||
| 3976 | void | 3978 | void |
| 3977 | resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) | 3979 | resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) |
| 3978 | { | 3980 | { |
| @@ -4073,7 +4075,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) | |||
| 4073 | m = XWINDOW (mini); | 4075 | m = XWINDOW (mini); |
| 4074 | if (horflag) | 4076 | if (horflag) |
| 4075 | { | 4077 | { |
| 4076 | m->total_cols = size; | 4078 | m->total_cols = new_size; |
| 4077 | m->pixel_width = new_pixel_size; | 4079 | m->pixel_width = new_pixel_size; |
| 4078 | } | 4080 | } |
| 4079 | else | 4081 | else |