# HG changeset patch # User Gerd Moellmann # Date 976204230 0 # Node ID 642fb6c53a10d758ac0baf1d5706a0a37c882c34 # Parent fedc41b477f0694e87d68970f1b78f8503fb5720 (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. diff -r fedc41b477f0 -r 642fb6c53a10 src/process.c --- a/src/process.c Thu Dec 07 15:23:07 2000 +0000 +++ b/src/process.c Thu Dec 07 15:50:30 2000 +0000 @@ -3055,6 +3055,7 @@ int before, before_byte; int opoint_byte; Lisp_Object text; + struct buffer *b; odeactivate = Vdeactivate_mark; @@ -3120,7 +3121,14 @@ signal_after_change (before, 0, PT - before); update_compositions (before, PT, CHECK_BORDER); - set_marker_both (p->mark, p->buffer, PT, PT_BYTE); + /* Make sure the process marker's position is valid when the + process buffer is changed in the signal_after_change above. + W3 is known to do that. */ + if (BUFFERP (p->buffer) + && (b = XBUFFER (p->buffer), b != current_buffer)) + set_marker_both (p->mark, p->buffer, BUF_PT (b), BUF_PT_BYTE (b)); + else + set_marker_both (p->mark, p->buffer, PT, PT_BYTE); update_mode_lines++;