When I use term-mode (ansi-term), the bottom row of the terminal often disappears from the window. For example, if I execute Emacs in ansi-term with -nw option, the minibuffer is unusable because it becomes completely hidden. I investigated this problem and found the solution. In term.el, the number of rows of the terminal window is calculated as: (1- (window-height)) This expression, however, doesn't always return exact value from lack of consideration to the header line height and the spacing of each row. So I tested the better expression instead: (if (display-graphic-p) (let ((e (window-inside-pixel-edges)) (s (or line-spacing 0))) (/ (+ (- (nth 3 e) (cadr e)) s) (+ (frame-char-height) s))) (window-text-height)) and it seems to work fine. We can test this expression by evaluating the following code before starting ansi-term: (add-hook 'term-mode-hook (lambda () (fset 'term-window-height #'(lambda () (if (display-graphic-p) (let ((e (window-inside-pixel-edges)) (s (or line-spacing 0))) (/ (+ (- (nth 3 e) (cadr e)) s) (+ (frame-char-height) s))) (window-text-height)))) (fset 'term-check-size #'(lambda (process) (when (or (/= term-height (term-window-height)) (/= term-width (term-window-width))) (term-reset-size (term-window-height) (term-window-width)) (set-process-window-size process term-height term-width)))) (setq term-height (term-window-height)))) or applying the patch I attached.