]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix frame-inner-height in non-GUI builds
authorBasil L. Contovounesios <contovob@tcd.ie>
Thu, 18 Mar 2021 21:39:05 +0000 (21:39 +0000)
committerBasil L. Contovounesios <contovob@tcd.ie>
Thu, 18 Mar 2021 22:13:05 +0000 (22:13 +0000)
Include tab bar in frame's inner height in non-GUI builds that don't
define tab-bar-height.  This is consistent with the inclusion of the
menu bar in the calculated height.  It is also consistent with TTY
frames of GUI builds, for which tab-bar-height is always zero
anyway (bug#47234).  Fix suggested by Eli Zaretskii <eliz@gnu.org>.

* lisp/frame.el (frame-inner-height): Don't assume tab-bar-height is
defined in builds --without-x.

lisp/frame.el

index 15e46c9e210067bed9dc1e82c165fbddf23a8287..b7fd71e90531762c7f979ad1937025ee84cbff56 100644 (file)
@@ -1344,7 +1344,7 @@ FRAME defaults to the selected frame."
 FRAME defaults to the selected frame."
   (setq frame (window-normalize-frame frame))
   (- (frame-native-height frame)
-     (tab-bar-height frame t)
+     (if (fboundp 'tab-bar-height) (tab-bar-height frame t) 0)
      (* 2 (frame-internal-border-width frame))))
 
 (defun frame-outer-width (&optional frame)