diff options
Diffstat (limited to 'lisp/term.el')
-rw-r--r-- | lisp/term.el | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lisp/term.el b/lisp/term.el index 6d922356236..464ff40c23c 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -2611,10 +2611,7 @@ See `term-prompt-regexp'." (defun term-move-columns (delta) (setq term-current-column (max 0 (+ (term-current-column) delta))) - (let (point-at-eol) - (save-excursion - (end-of-line) - (setq point-at-eol (point))) + (let ((point-at-eol (line-end-position))) (move-to-column term-current-column t) ;; If move-to-column extends the current line it will use the face ;; from the last character on the line, set the face for the chars @@ -3792,10 +3789,8 @@ if KIND is 1, erase from home to point; else erase from home to point-max." (term-vertical-motion 1) (when (bolp) (backward-char)) - (setq save-eol (point)) - (save-excursion - (end-of-line) - (setq pnt-at-eol (point))) + (setq save-eol (point) + pnt-at-eol (line-end-position)) (move-to-column (+ (term-start-line-column) (- term-width count)) t) ;; If move-to-column extends the current line it will use the face ;; from the last character on the line, set the face for the chars |