Don't flicker due to screen line breaking
* eat.el (eat--eshell-synchronize-scroll) (eat--synchronize-scroll): Use 'recenter' instead of 'set-window-start' to synchronize scrolling.
This commit is contained in:
parent
9d0f612004
commit
1d7a1ea0b5
1 changed files with 13 additions and 22 deletions
35
eat.el
35
eat.el
|
@ -6483,10 +6483,14 @@ symbol `buffer', in which case the point of current buffer is set."
|
||||||
(dolist (window windows)
|
(dolist (window windows)
|
||||||
(if (eq window 'buffer)
|
(if (eq window 'buffer)
|
||||||
(goto-char (eat-term-display-cursor eat-terminal))
|
(goto-char (eat-term-display-cursor eat-terminal))
|
||||||
(set-window-start
|
(with-selected-window window
|
||||||
window (eat-term-display-beginning eat-terminal))
|
(set-window-point nil (eat-term-display-cursor eat-terminal))
|
||||||
(set-window-point
|
(recenter
|
||||||
window (eat-term-display-cursor eat-terminal)))))
|
(- (how-many "\n" (eat-term-display-beginning eat-terminal)
|
||||||
|
(eat-term-display-cursor eat-terminal))
|
||||||
|
(cdr (eat-term-size eat-terminal))
|
||||||
|
(max 0 (- (floor (window-screen-lines))
|
||||||
|
(cdr (eat-term-size eat-terminal))))))))))
|
||||||
|
|
||||||
(defun eat--setup-glyphless-chars ()
|
(defun eat--setup-glyphless-chars ()
|
||||||
"Setup the display of glyphless characters."
|
"Setup the display of glyphless characters."
|
||||||
|
@ -7498,24 +7502,11 @@ symbol `buffer', in which case the point of current buffer is set."
|
||||||
(dolist (window windows)
|
(dolist (window windows)
|
||||||
(if (eq window 'buffer)
|
(if (eq window 'buffer)
|
||||||
(goto-char (eat-term-display-cursor eat-terminal))
|
(goto-char (eat-term-display-cursor eat-terminal))
|
||||||
(set-window-start
|
(with-selected-window window
|
||||||
window
|
(set-window-point nil (eat-term-display-cursor eat-terminal))
|
||||||
(if (or (eat-term-in-alternative-display-p eat-terminal)
|
(recenter
|
||||||
eat--eshell-char-mode)
|
(- (1+ (how-many "\n" (eat-term-display-cursor eat-terminal)
|
||||||
(eat-term-display-beginning eat-terminal)
|
(eat-term-end eat-terminal)))))))))
|
||||||
(save-restriction
|
|
||||||
(narrow-to-region (eat-term-beginning eat-terminal)
|
|
||||||
(eat-term-end eat-terminal))
|
|
||||||
(let ((start-line (- (floor (window-screen-lines))
|
|
||||||
(line-number-at-pos (point-max)))))
|
|
||||||
(goto-char (point-min))
|
|
||||||
(widen)
|
|
||||||
(if (<= start-line 0)
|
|
||||||
(eat-term-display-beginning eat-terminal)
|
|
||||||
(vertical-motion (- start-line))
|
|
||||||
(point))))))
|
|
||||||
(set-window-point
|
|
||||||
window (eat-term-display-cursor eat-terminal)))))
|
|
||||||
|
|
||||||
(defun eat--eshell-update-cwd ()
|
(defun eat--eshell-update-cwd ()
|
||||||
"Update the current working directory."
|
"Update the current working directory."
|
||||||
|
|
Loading…
Add table
Reference in a new issue