aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorGerd Moellmann2000-12-07 15:53:18 +0000
committerGerd Moellmann2000-12-07 15:53:18 +0000
commit926b7e5e3ec4ddb93aaf8d1357020a6b7e8a55a1 (patch)
treedf1024f1059863dd5320881f11182273af4b581c /src/process.c
parente04d21aaaecdca40193e176a801e3c3ca4cb5250 (diff)
downloademacs-926b7e5e3ec4ddb93aaf8d1357020a6b7e8a55a1.tar.gz
emacs-926b7e5e3ec4ddb93aaf8d1357020a6b7e8a55a1.zip
(read_process_output): Make sure the process marker's
position is valid when the process buffer is changed in after-change functions. W3 does that.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c
index cb51af92af3..c91ab2c24fc 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3055,6 +3055,7 @@ read_process_output (proc, channel)
3055 int before, before_byte; 3055 int before, before_byte;
3056 int opoint_byte; 3056 int opoint_byte;
3057 Lisp_Object text; 3057 Lisp_Object text;
3058 struct buffer *b;
3058 3059
3059 odeactivate = Vdeactivate_mark; 3060 odeactivate = Vdeactivate_mark;
3060 3061
@@ -3120,7 +3121,14 @@ read_process_output (proc, channel)
3120 signal_after_change (before, 0, PT - before); 3121 signal_after_change (before, 0, PT - before);
3121 update_compositions (before, PT, CHECK_BORDER); 3122 update_compositions (before, PT, CHECK_BORDER);
3122 3123
3123 set_marker_both (p->mark, p->buffer, PT, PT_BYTE); 3124 /* Make sure the process marker's position is valid when the
3125 process buffer is changed in the signal_after_change above.
3126 W3 is known to do that. */
3127 if (BUFFERP (p->buffer)
3128 && (b = XBUFFER (p->buffer), b != current_buffer))
3129 set_marker_both (p->mark, p->buffer, BUF_PT (b), BUF_PT_BYTE (b));
3130 else
3131 set_marker_both (p->mark, p->buffer, PT, PT_BYTE);
3124 3132
3125 update_mode_lines++; 3133 update_mode_lines++;
3126 3134