# HG changeset patch # User Stefan Monnier # Date 1036177566 0 # Node ID 7103ad01172d1cb45c6fe1f82ee950ffc3e25bdf # Parent 4a1a091e479062dea833dfe8f485bf2c609cf957 (find_field): Make an exception for nil fields. diff -r 4a1a091e4790 -r 7103ad01172d src/editfns.c --- a/src/editfns.c Fri Nov 01 17:41:41 2002 +0000 +++ b/src/editfns.c Fri Nov 01 19:06:06 2002 +0000 @@ -531,6 +531,12 @@ at_field_end = 1; if (!EQ (field, before_field)) at_field_start = 1; + if (NILP (field) && at_field_start && at_field_end) + /* If an inserted char would have a nil field while the surrounding + text is non-nil, we're probably not looking at a + zero-length field, but instead at a non-nil field that's + not intended for editing (such as comint's prompts). */ + at_field_end = at_field_start = 0; } /* Note about special `boundary' fields: