From 682715a78b9434b043cf0d664ed9c030508750d5 Mon Sep 17 00:00:00 2001 From: Pierre Courtieu Date: Thu, 17 Jan 2013 10:04:59 +0000 Subject: Fixed a bug with window height optimization. When using unicode symbols, window-height (which is deprecated anyway) is incorrect, using window-text-height instead seems better. --- coq/coq.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coq/coq.el b/coq/coq.el index 451a1762..0bf24650 100644 --- a/coq/coq.el +++ b/coq/coq.el @@ -1963,13 +1963,13 @@ Only when three-buffer-mode is enabled." (let (;; maxhgth is the max height of both resp and goals buffers to avoid ;; make the other disappear (maxhgth (with-selected-window (get-buffer-window proof-script-buffer) - (- (window-height) window-min-height))) + (- (window-text-height) window-min-height))) hgt-resp nline-resp) (with-selected-window (get-buffer-window proof-response-buffer) - (setq hgt-resp (window-height)) + (setq hgt-resp (window-text-height)) (with-current-buffer proof-response-buffer (setq nline-resp ; number of lines we want for response buffer - (min maxhgth (max window-min-height ; + 1 here for comfort + (min maxhgth (max window-min-height ; + 1 for comfort (+ 1 (count-lines (point-max) (point-min))))))) (unless (is-not-split-vertic (selected-window)) (shrink-window (- hgt-resp nline-resp))) -- cgit v1.2.3