+2012-06-17 Chong Yidong <cyd@gnu.org>
+
+ * 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 <rgm@gnu.org>
* international/mule-cmds.el (mule-menu-keymap)
(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))
(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