diff options
| author | Dan Nicolaescu | 2005-11-15 17:13:22 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2005-11-15 17:13:22 +0000 |
| commit | 59c560f76f2df0444d8682ac286aac496d1906d0 (patch) | |
| tree | c1ba4ec318f815dbe35d33902550171260de2f37 | |
| parent | 28a099a4aa5b85217d0b5a5c9a725c96d162e702 (diff) | |
| download | emacs-59c560f76f2df0444d8682ac286aac496d1906d0.tar.gz emacs-59c560f76f2df0444d8682ac286aac496d1906d0.zip | |
(term-termcap-format): Fix typos.
(term-down): Fix the negative argument case.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/term.el | 35 |
2 files changed, 28 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3734eb1f57e..185bfdacab6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-11-15 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * term.el (term-termcap-format): Fix typos. | ||
| 4 | (term-down): Fix the negative argument case. | ||
| 5 | |||
| 1 | 2005-11-16 Nick Roberts <nickrob@snap.net.nz> | 6 | 2005-11-16 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 7 | ||
| 3 | * progmodes/gdb-ui.el: Remove face-alias left over from change on | 8 | * progmodes/gdb-ui.el: Remove face-alias left over from change on |
diff --git a/lisp/term.el b/lisp/term.el index 4d319c253ae..14d4fb9a5ab 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -1406,8 +1406,8 @@ The main purpose is to get rid of the local keymap." | |||
| 1406 | :UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC\ | 1406 | :UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC\ |
| 1407 | :kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\ | 1407 | :kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\ |
| 1408 | :mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\ | 1408 | :mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\ |
| 1409 | :bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\ | 1409 | :bl=^G:do=^J:le=^H:ta=^I:se=\\E[27m:ue=\\E24m\ |
| 1410 | :kb=^?:kD=^[[3~:sc=\E7:rc=\E8:r1=\Ec:" | 1410 | :kb=^?:kD=^[[3~:sc=\\E7:rc=\\E8:r1=\\Ec:" |
| 1411 | ;;; : -undefine ic | 1411 | ;;; : -undefine ic |
| 1412 | ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ | 1412 | ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ |
| 1413 | "termcap capabilities supported") | 1413 | "termcap capabilities supported") |
| @@ -3615,21 +3615,32 @@ all pending output has been dealt with.")) | |||
| 3615 | (defun term-down (down &optional check-for-scroll) | 3615 | (defun term-down (down &optional check-for-scroll) |
| 3616 | "Move down DOWN screen lines vertically." | 3616 | "Move down DOWN screen lines vertically." |
| 3617 | (let ((start-column (term-horizontal-column))) | 3617 | (let ((start-column (term-horizontal-column))) |
| 3618 | (if (and check-for-scroll (or term-scroll-with-delete term-pager-count)) | 3618 | (when (and check-for-scroll (or term-scroll-with-delete term-pager-count)) |
| 3619 | (setq down (term-handle-scroll down))) | 3619 | (setq down (term-handle-scroll down))) |
| 3620 | (term-adjust-current-row-cache down) | 3620 | (unless (and (= term-current-row 0) (< down 0)) |
| 3621 | (if (or (/= (point) (point-max)) (< down 0)) | 3621 | (term-adjust-current-row-cache down) |
| 3622 | (setq down (- down (term-vertical-motion down)))) | 3622 | (when (or (/= (point) (point-max)) (< down 0)) |
| 3623 | ;; Extend buffer with extra blank lines if needed. | 3623 | (setq down (- down (term-vertical-motion down))))) |
| 3624 | (cond ((> down 0) | 3624 | (cond ((> down 0) |
| 3625 | ;; Extend buffer with extra blank lines if needed. | ||
| 3625 | (term-insert-char ?\n down) | 3626 | (term-insert-char ?\n down) |
| 3626 | (setq term-current-column 0) | 3627 | (setq term-current-column 0) |
| 3627 | (setq term-start-line-column 0)) | 3628 | (setq term-start-line-column 0)) |
| 3628 | (t | 3629 | (t |
| 3629 | (setq term-current-column nil) | 3630 | (when (= term-current-row 0) |
| 3631 | ;; Insert lines if at the beginning. | ||
| 3632 | (save-excursion (term-insert-char ?\n (- down))) | ||
| 3633 | (save-excursion | ||
| 3634 | (let (p) | ||
| 3635 | ;; Delete lines from the end. | ||
| 3636 | (forward-line term-height) | ||
| 3637 | (setq p (point)) | ||
| 3638 | (forward-line (- down)) | ||
| 3639 | (delete-region p (point))))) | ||
| 3640 | (setq term-current-column 0) | ||
| 3630 | (setq term-start-line-column (current-column)))) | 3641 | (setq term-start-line-column (current-column)))) |
| 3631 | (if start-column | 3642 | (when start-column |
| 3632 | (term-move-columns start-column)))) | 3643 | (term-move-columns start-column)))) |
| 3633 | 3644 | ||
| 3634 | ;; Assuming point is at the beginning of a screen line, | 3645 | ;; Assuming point is at the beginning of a screen line, |
| 3635 | ;; if the line above point wraps around, add a ?\n to undo the wrapping. | 3646 | ;; if the line above point wraps around, add a ?\n to undo the wrapping. |
| @@ -3695,7 +3706,7 @@ Should only be called when point is at the start of a screen line." | |||
| 3695 | 3706 | ||
| 3696 | ;;; Insert COUNT spaces after point, but do not change any of | 3707 | ;;; Insert COUNT spaces after point, but do not change any of |
| 3697 | ;;; following screen lines. Hence we may have to delete characters | 3708 | ;;; following screen lines. Hence we may have to delete characters |
| 3698 | ;;; at teh end of this screen line to make room. | 3709 | ;;; at the end of this screen line to make room. |
| 3699 | 3710 | ||
| 3700 | (defun term-insert-spaces (count) | 3711 | (defun term-insert-spaces (count) |
| 3701 | (let ((save-point (point)) (save-eol) (point-at-eol)) | 3712 | (let ((save-point (point)) (save-eol) (point-at-eol)) |