2573 |
|
|
2574 |
(defun term-move-columns (delta) |
(defun term-move-columns (delta) |
2575 |
(setq term-current-column (max 0 (+ (term-current-column) delta))) |
(setq term-current-column (max 0 (+ (term-current-column) delta))) |
2576 |
(move-to-column term-current-column t)) |
(let (point-at-eol) |
2577 |
|
(save-excursion |
2578 |
|
(end-of-line) |
2579 |
|
(setq point-at-eol (point))) |
2580 |
|
(move-to-column term-current-column t) |
2581 |
|
;; If move-to-column extends the current line it will use the face |
2582 |
|
;; from the last character on the line, set the face for the chars |
2583 |
|
;; to default. |
2584 |
|
(when (> (point) point-at-eol) |
2585 |
|
(put-text-property point-at-eol (point) 'face 'default)))) |
2586 |
|
|
2587 |
;; Insert COUNT copies of CHAR in the default face. |
;; Insert COUNT copies of CHAR in the default face. |
2588 |
(defun term-insert-char (char count) |
(defun term-insert-char (char count) |
3037 |
;;; default one. |
;;; default one. |
3038 |
(defun term-reset-terminal () |
(defun term-reset-terminal () |
3039 |
(erase-buffer) |
(erase-buffer) |
3040 |
(setq term-current-row 1) |
(setq term-current-row 0) |
3041 |
(setq term-current-column 1) |
(setq term-current-column 1) |
3042 |
(setq term-insert-mode nil) |
(setq term-insert-mode nil) |
3043 |
(setq term-current-face nil) |
(setq term-current-face nil) |
3046 |
(setq term-ansi-current-reverse 0) |
(setq term-ansi-current-reverse 0) |
3047 |
(setq term-ansi-current-color 0) |
(setq term-ansi-current-color 0) |
3048 |
(setq term-ansi-current-invisible 0) |
(setq term-ansi-current-invisible 0) |
3049 |
(setq term-ansi-face-already-done 1) |
(setq term-ansi-face-already-done 0) |
3050 |
(setq term-ansi-current-bg-color 0)) |
(setq term-ansi-current-bg-color 0)) |
3051 |
|
|
3052 |
;;; New function to deal with ansi colorized output, as you can see you can |
;;; New function to deal with ansi colorized output, as you can see you can |
3694 |
;;; at teh end of this screen line to make room. |
;;; at teh end of this screen line to make room. |
3695 |
|
|
3696 |
(defun term-insert-spaces (count) |
(defun term-insert-spaces (count) |
3697 |
(let ((save-point (point)) (save-eol)) |
(let ((save-point (point)) (save-eol) (point-at-eol)) |
3698 |
(term-vertical-motion 1) |
(term-vertical-motion 1) |
3699 |
(if (bolp) |
(if (bolp) |
3700 |
(backward-char)) |
(backward-char)) |
3701 |
(setq save-eol (point)) |
(setq save-eol (point)) |
3702 |
|
(save-excursion |
3703 |
|
(end-of-line) |
3704 |
|
(setq point-at-eol (point))) |
3705 |
(move-to-column (+ (term-start-line-column) (- term-width count)) t) |
(move-to-column (+ (term-start-line-column) (- term-width count)) t) |
3706 |
|
;; If move-to-column extends the current line it will use the face |
3707 |
|
;; from the last character on the line, set the face for the chars |
3708 |
|
;; to default. |
3709 |
|
(when (> (point) (point-at-eol)) |
3710 |
|
(put-text-property point-at-eol (point) 'face 'default)) |
3711 |
(if (> save-eol (point)) |
(if (> save-eol (point)) |
3712 |
(delete-region (point) save-eol)) |
(delete-region (point) save-eol)) |
3713 |
(goto-char save-point) |
(goto-char save-point) |