diff options
| author | Richard M. Stallman | 1995-06-26 17:04:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-06-26 17:04:47 +0000 |
| commit | 3d22c388c0fcc72275de570c7390c96a2cdf1690 (patch) | |
| tree | d1dd2de186aba9ecfce3495f42a35c238d2d8a05 /src | |
| parent | f3d4eb7b82f4acd98c1925272c7dd1a213636578 (diff) | |
| download | emacs-3d22c388c0fcc72275de570c7390c96a2cdf1690.tar.gz emacs-3d22c388c0fcc72275de570c7390c96a2cdf1690.zip | |
(Fsplit_window): Nicer error if split size is too small.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/window.c b/src/window.c index 09781e2497e..56fa5882528 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2231,9 +2231,11 @@ and put SIZE columns in the first of the pair.") | |||
| 2231 | 2231 | ||
| 2232 | if (NILP (horflag)) | 2232 | if (NILP (horflag)) |
| 2233 | { | 2233 | { |
| 2234 | if (size < window_min_height | 2234 | if (size < window_min_height) |
| 2235 | || size + window_min_height > XFASTINT (o->height)) | 2235 | error ("Window height %d too small (after splitting)", size); |
| 2236 | args_out_of_range_3 (window, chsize, horflag); | 2236 | if (size + window_min_height > XFASTINT (o->height)) |
| 2237 | error ("Window height %d too small (after splitting)", | ||
| 2238 | XFASTINT (o->height) - size); | ||
| 2237 | if (NILP (o->parent) | 2239 | if (NILP (o->parent) |
| 2238 | || NILP (XWINDOW (o->parent)->vchild)) | 2240 | || NILP (XWINDOW (o->parent)->vchild)) |
| 2239 | { | 2241 | { |
| @@ -2244,9 +2246,11 @@ and put SIZE columns in the first of the pair.") | |||
| 2244 | } | 2246 | } |
| 2245 | else | 2247 | else |
| 2246 | { | 2248 | { |
| 2247 | if (size < window_min_width | 2249 | if (size < window_min_width) |
| 2248 | || size + window_min_width > XFASTINT (o->width)) | 2250 | error ("Window width %d too small (after splitting)", size); |
| 2249 | args_out_of_range_3 (window, chsize, horflag); | 2251 | if (size + window_min_width > XFASTINT (o->width)) |
| 2252 | error ("Window width %d too small (after splitting)", | ||
| 2253 | XFASTINT (o->width) - size); | ||
| 2250 | if (NILP (o->parent) | 2254 | if (NILP (o->parent) |
| 2251 | || NILP (XWINDOW (o->parent)->hchild)) | 2255 | || NILP (XWINDOW (o->parent)->hchild)) |
| 2252 | { | 2256 | { |