diff options
| author | Dan Nicolaescu | 2006-06-15 22:58:10 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2006-06-15 22:58:10 +0000 |
| commit | 2f182d8d513907a70ebd0d5042da0dbe0a4835dd (patch) | |
| tree | 0528546a51ea4c164939aebdea423e3afc85af8a | |
| parent | 8a7269eb1bdbce425ea372573e81bf7affcaa8d9 (diff) | |
| download | emacs-2f182d8d513907a70ebd0d5042da0dbe0a4835dd.tar.gz emacs-2f182d8d513907a70ebd0d5042da0dbe0a4835dd.zip | |
(term-handle-scroll, term-delete-lines)
(term-insert-lines): Fix off by one errors.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/term.el | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b3ec21cba3f..80f1b26291a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-06-15 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * term.el (term-handle-scroll, term-delete-lines) | ||
| 4 | (term-insert-lines): Fix off by one errors. | ||
| 5 | |||
| 1 | 2006-06-15 Katsumi Yamaoka <yamaoka@jpl.org> (tiny change) | 6 | 2006-06-15 Katsumi Yamaoka <yamaoka@jpl.org> (tiny change) |
| 2 | 7 | ||
| 3 | * net/tramp.el (tramp-touch): Use UTC to express time. | 8 | * net/tramp.el (tramp-touch): Use UTC to express time. |
diff --git a/lisp/term.el b/lisp/term.el index 8e2e0773121..8dafcfc894b 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -3613,7 +3613,7 @@ all pending output has been dealt with.")) | |||
| 3613 | (progn | 3613 | (progn |
| 3614 | ;; Delete scroll-needed lines at term-scroll-end, | 3614 | ;; Delete scroll-needed lines at term-scroll-end, |
| 3615 | ;; then insert scroll-needed lines. | 3615 | ;; then insert scroll-needed lines. |
| 3616 | (term-vertical-motion (1- term-scroll-end)) | 3616 | (term-vertical-motion term-scroll-end) |
| 3617 | (end-of-line) | 3617 | (end-of-line) |
| 3618 | (setq save-top (point)) | 3618 | (setq save-top (point)) |
| 3619 | (term-vertical-motion scroll-needed) | 3619 | (term-vertical-motion scroll-needed) |
| @@ -3767,11 +3767,12 @@ Should only be called when point is at the start of a screen line." | |||
| 3767 | (save-current-column term-current-column) | 3767 | (save-current-column term-current-column) |
| 3768 | (save-start-line-column term-start-line-column) | 3768 | (save-start-line-column term-start-line-column) |
| 3769 | (save-current-row (term-current-row))) | 3769 | (save-current-row (term-current-row))) |
| 3770 | (when (>= (+ save-current-row lines) term-scroll-end) | 3770 | ;; The number of inserted lines shouldn't exceed the scroll region end. |
| 3771 | (setq lines (- lines (- (+ save-current-row lines) term-scroll-end)))) | 3771 | (when (> (+ save-current-row lines) (1+ term-scroll-end)) |
| 3772 | (setq lines (- lines (- (+ save-current-row lines) (1+ term-scroll-end))))) | ||
| 3772 | (term-down lines) | 3773 | (term-down lines) |
| 3773 | (delete-region start (point)) | 3774 | (delete-region start (point)) |
| 3774 | (term-down (- term-scroll-end save-current-row lines)) | 3775 | (term-down (- (1+ term-scroll-end) save-current-row lines)) |
| 3775 | (term-insert-char ?\n lines) | 3776 | (term-insert-char ?\n lines) |
| 3776 | (setq term-current-column save-current-column) | 3777 | (setq term-current-column save-current-column) |
| 3777 | (setq term-start-line-column save-start-line-column) | 3778 | (setq term-start-line-column save-start-line-column) |
| @@ -3792,9 +3793,9 @@ Should only be called when point is at the start of a screen line." | |||
| 3792 | (term-down (- term-scroll-start save-current-row)) | 3793 | (term-down (- term-scroll-start save-current-row)) |
| 3793 | (setq start (point))) | 3794 | (setq start (point))) |
| 3794 | ;; The number of inserted lines shouldn't exceed the scroll region end. | 3795 | ;; The number of inserted lines shouldn't exceed the scroll region end. |
| 3795 | (when (>= (+ save-current-row lines) term-scroll-end) | 3796 | (when (> (+ save-current-row lines) (1+ term-scroll-end)) |
| 3796 | (setq lines (- lines (- (+ save-current-row lines) term-scroll-end)))) | 3797 | (setq lines (- lines (- (+ save-current-row lines)(1+ term-scroll-end))))) |
| 3797 | (term-down (- term-scroll-end save-current-row lines))) | 3798 | (term-down (- (1+ term-scroll-end) save-current-row lines))) |
| 3798 | (setq start-deleted (point)) | 3799 | (setq start-deleted (point)) |
| 3799 | (term-down lines) | 3800 | (term-down lines) |
| 3800 | (delete-region start-deleted (point)) | 3801 | (delete-region start-deleted (point)) |