diff src/editfns.c @ 48111:7103ad01172d

(find_field): Make an exception for nil fields.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 01 Nov 2002 19:06:06 +0000
parents 2a8ba962e34d
children 72f8d789f551
line wrap: on
line diff
--- 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: