diff options
author | Chong Yidong <cyd@gnu.org> | 2012-05-07 11:14:21 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-05-07 11:14:21 +0800 |
commit | 18f00515789afb71a4d57171d989a82a1cbe7615 (patch) | |
tree | e07783703adbe68a5f6bf56fcacfe813d4305865 /lisp/ansi-color.el | |
parent | fd075e7b2b248a4357af64e85e2cd3b87949fa23 (diff) | |
download | emacs-18f00515789afb71a4d57171d989a82a1cbe7615.tar.gz |
Fix a gdb-mi process filtering issue arising in ansi-color.el.
* lisp/ansi-color.el (ansi-color-process-output): Check for validity
of comint-last-output-start before using it. This avoids a bad
interaction with gdb-mi's input/output buffer.
Diffstat (limited to 'lisp/ansi-color.el')
-rw-r--r-- | lisp/ansi-color.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 15a543e9591..6a82f176676 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -217,8 +217,12 @@ The comint output is assumed to lie between the marker `comint-last-output-start' and the process-mark. This is a good function to put in `comint-output-filter-functions'." - (let ((start-marker (or comint-last-output-start - (point-min-marker))) + (let ((start-marker (if (and (markerp comint-last-output-start) + (eq (marker-buffer comint-last-output-start) + (current-buffer)) + (marker-position comint-last-output-start)) + comint-last-output-start + (point-min-marker))) (end-marker (process-mark (get-buffer-process (current-buffer))))) (cond ((eq ansi-color-for-comint-mode nil)) ((eq ansi-color-for-comint-mode 'filter) |