aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <courtieu@lri.fr>2007-04-26 19:00:16 +0000
committerGravatar Pierre Courtieu <courtieu@lri.fr>2007-04-26 19:00:16 +0000
commitd02f3d432aafdc9fe05dd2b71b71978c0bd21f57 (patch)
treeb4182cf4eda03e49401187ab1162291acbbb53a5 /coq/coq.el
parent4835077e41fd8651e84eb2add7c7e85f50c8a646 (diff)
Fixing auto shrink in coq three window mode, to avoid window
disappearing.
Diffstat (limited to 'coq/coq.el')
-rw-r--r--coq/coq.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/coq/coq.el b/coq/coq.el
index 5e634dd3..564cfada 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -1617,13 +1617,17 @@ Only when three-buffer-mode is enabled."
(> (frame-height) 10)
(get-buffer-window proof-response-buffer))
(let ((curwin (selected-window))
- (maxhgth (- (window-height) window-min-height)) hgt-resp nline-resp)
+ ;; maxhgth is the max height of both resp and goals buffers to avoid
+ ;; make the other disappear
+ (maxhgth (- (window-height) window-min-height))
+ hgt-resp nline-resp)
(select-window (get-buffer-window proof-response-buffer))
(setq hgt-resp (window-height))
- (setq nline-resp
- (min maxhgth (max window-min-height (count-lines (point-max) (point-min)))))
+ (setq nline-resp ; number of lines we want for response buffer
+ (min maxhgth (max window-min-height ; + 1 here for comfort
+ (+ 1 (count-lines (point-max) (point-min))))))
(unless (is-not-split-vertic (selected-window))
- (shrink-window (- hgt-resp (+ 1 nline-resp))))
+ (shrink-window (- hgt-resp nline-resp)))
(beginning-of-buffer)
(recenter)
(select-window curwin)