[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108640: Fix point motion bug in term
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108640: Fix point motion bug in term-emulate-terminal. |
Date: |
Sun, 17 Jun 2012 16:26:13 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108640
fixes bug: http://debbugs.gnu.org/4635
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2012-06-17 16:26:13 +0800
message:
Fix point motion bug in term-emulate-terminal.
* lisp/term.el (term-emulate-terminal): If term-check-size is called,
move point to the process mark without resetting point.
modified:
lisp/ChangeLog
lisp/term.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-06-17 05:13:40 +0000
+++ b/lisp/ChangeLog 2012-06-17 08:26:13 +0000
@@ -1,3 +1,8 @@
+2012-06-17 Chong Yidong <address@hidden>
+
+ * term.el (term-emulate-terminal): If term-check-size is called,
+ move point to the process mark without resetting point (Bug#4635).
+
2012-06-13 Glenn Morris <address@hidden>
* international/mule-cmds.el (mule-menu-keymap)
=== modified file 'lisp/term.el'
--- a/lisp/term.el 2012-05-11 15:05:03 +0000
+++ b/lisp/term.el 2012-06-17 08:26:13 +0000
@@ -2710,10 +2710,8 @@
(str-length (length str)))
(save-selected-window
- ;; Let's handle the messages. -mm
-
- (let* ((newstr (term-handle-ansi-terminal-messages str)))
- (when (not (eq str newstr))
+ (let ((newstr (term-handle-ansi-terminal-messages str)))
+ (unless (eq str newstr)
(setq handled-ansi-message t
str newstr)))
(setq str-length (length str))
@@ -2723,18 +2721,19 @@
(delete-region term-pending-delete-marker (process-mark proc))
(set-marker term-pending-delete-marker nil))
+ (when (/= (point) (process-mark proc))
+ (setq save-point (point-marker)))
+
+ ;; Note if the window size has changed. We used to reset
+ ;; point too, but that gives incorrect results (Bug#4635).
(if (eq (window-buffer) (current-buffer))
(progn
(setq term-vertical-motion (symbol-function 'vertical-motion))
(term-check-size proc))
(setq term-vertical-motion
(symbol-function 'term-buffer-vertical-motion)))
-
(setq save-marker (copy-marker (process-mark proc)))
-
- (when (/= (point) (process-mark proc))
- (setq save-point (point-marker))
- (goto-char (process-mark proc)))
+ (goto-char (process-mark proc))
(save-restriction
;; If the buffer is in line mode, and there is a partial
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108640: Fix point motion bug in term-emulate-terminal.,
Chong Yidong <=