emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/eat d35864ca6b 4/4: Calculate the number of lines on windo


From: ELPA Syncer
Subject: [nongnu] elpa/eat d35864ca6b 4/4: Calculate the number of lines on window properly
Date: Sun, 4 Dec 2022 12:58:34 -0500 (EST)

branch: elpa/eat
commit d35864ca6be969b6426c6ff2e7f46813e591370c
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>

    Calculate the number of lines on window properly
    
    * eat.el (eat-exec, eat--eshell-setup-proc-and-term)
    (eat--eshell-adjust-make-process-args)
    (eat--eshell-synchronize-scroll): Calculate the number of
    available lines on window properly.
---
 eat.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eat.el b/eat.el
index 33461386f9..6eaacf328c 100644
--- a/eat.el
+++ b/eat.el
@@ -4572,7 +4572,7 @@ same Eat buffer.  The hook `eat-exec-hook' is run after 
each exec."
       (when-let* ((window (get-buffer-window nil t)))
         (with-selected-window window
           (eat-term-resize eat--terminal (window-max-chars-per-line)
-                           (window-text-height))))
+                           (floor (window-screen-lines)))))
       (setf (eat-term-input-function eat--terminal) #'eat--send-input
             (eat-term-set-cursor-function eat--terminal)
             #'eat--set-cursor
@@ -4850,7 +4850,7 @@ PROGRAM can be a shell command."
     (when-let* ((window (get-buffer-window nil t)))
       (with-selected-window window
         (eat-term-resize eat--terminal (window-max-chars-per-line)
-                         (window-text-height))))
+                         (floor (window-screen-lines)))))
     (eat-term-redisplay eat--terminal)
     (setq-local eshell-output-filter-functions
                 '(eat--eshell-output-filter))
@@ -4969,7 +4969,7 @@ modify its argument to change the filter, the sentinel 
and invoke
                   `("/usr/bin/env" "sh" "-c"
                     ,(format "stty -nl echo rows %d columns %d \
 sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
-                             (window-text-height)
+                             (floor (window-screen-lines))
                              (window-max-chars-per-line) null-device)
                     ".."
                     ,@(plist-get plist :command)))
@@ -5001,7 +5001,7 @@ sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
          (narrow-to-region
           (eat-term-beginning eat--terminal)
           (eat-term-end eat--terminal))
-         (let ((start-line (- (window-text-height window)
+         (let ((start-line (- (floor (window-screen-lines))
                               (line-number-at-pos (point-max)))))
            (goto-char (point-min))
            (widen)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]