From: Dan Nicolaescu Date: Fri, 3 Aug 2007 10:49:56 +0000 (+0000) Subject: (term-erase-in-display): Fix case when point is not at X-Git-Tag: emacs-pretest-23.0.90~11611 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1bb751ed2bab9205dc6dddd155c32d9e1be27f76;p=emacs.git (term-erase-in-display): Fix case when point is not at the beginning of the line. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8d35fa06ac5..cfbc404dc51 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-03 Dan Nicolaescu + + * term.el (term-erase-in-display): Fix case when point is not at + the beginning of the line. + 2007-08-03 Jay Belanger * calc/calc-ext.el (math-get-value,math-get-sdev) diff --git a/lisp/term.el b/lisp/term.el index c7b5ee249d1..55c5090fb2c 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -3715,12 +3715,12 @@ all pending output has been dealt with.")) (defun term-erase-in-display (kind) "Erases (that is blanks out) part of the window. If KIND is 0, erase from (point) to (point-max); -if KIND is 1, erase from home to point; else erase from home to point-max. -Should only be called when point is at the start of a screen line." +if KIND is 1, erase from home to point; else erase from home to point-max." (term-handle-deferred-scroll) (cond ((eq term-terminal-parameter 0) - (delete-region (point) (point-max)) - (term-unwrap-line)) + (let ((need-unwrap (bolp))) + (delete-region (point) (point-max)) + (when need-unwrap (term-unwrap-line)))) ((let ((row (term-current-row)) (col (term-horizontal-column)) (start-region term-home-marker)