nate@cpocd2.UUCP (Nate Hess) (05/04/87)
I received a fix for the bug I described with 'terminal-emulator' from
mly of the GNU project:
To fix, replace the definitions of te-set-window-start
and te-newline in emacs/lisp/terminal.el by the following:
(defun te-set-window-start ()
(let* ((w (get-buffer-window (current-buffer)))
(h (if w (window-height w))))
(cond ((not w)) ; buffer not displayed
((>= h (/ (- (point) (point-min)) (1+ te-width)))
;; this is the normal case
(set-window-start w (point-min)))
;; this happens if some vandal shrinks our window.
((>= h (/ (- (point-max) (point)) (1+ te-width)))
(set-window-start w (- (point-max) (* h (1+ te-width)) -1)))
;; I give up.
(t nil))))
(defun te-newline ()
"Move down a line, optionally do more processing, perhaps wrap/scroll,
move to start of new line, clear to end of line."
(end-of-line)
(cond ((not terminal-more-processing))
((< (setq te-more-count (1- te-more-count)) 0)
(te-set-more-count t))
((eql te-more-count 0)
;; this doesn't return
(te-more-break)))
(if (eobp)
(progn
(delete-region (point-min) (+ (point-min) te-width))
(goto-char (point-min))
(if terminal-scrolling
(progn (delete-char 1)
(goto-char (point-max))
(insert ?\n))))
(forward-char 1)
(delete-region (point) (+ (point) te-width)))
(insert-char ?\ te-width)
(beginning-of-line)
(te-set-window-start))
I wish to express public thanks to the GNU people for their speedy
replies to the several bug reports that I have sent in over the past few
months.
--Nate Hess
--
"How do you get your mind to tilt like your hat?"
...!{decwrl|hplabs!oliveb|pur-ee|qantel|amd}!intelca!mipos3!cpocd2!nate
<domainish> : nate@cpocd2.intel.com ATT : (602) 961-2037