changeset 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 4a1a091e4790
children 9c80cdee8ff8
files src/editfns.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
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: