changeset 32901:182718ad9737

(widget-field-end): When checking for a `boundary' field, do so in the correct buffer.
author Miles Bader <miles@gnu.org>
date Thu, 26 Oct 2000 08:21:53 +0000
parents 2c1711e23e22
children b0cee304020f
files lisp/wid-edit.el
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/wid-edit.el	Thu Oct 26 07:44:46 2000 +0000
+++ b/lisp/wid-edit.el	Thu Oct 26 08:21:53 2000 +0000
@@ -1077,13 +1077,15 @@
     ;; Don't subtract one if local-map works at the end of the overlay,
     ;; or if a special `boundary' field has been added after the widget
     ;; field.
-    (and overlay (if (and (not (eq (get-char-property (overlay-end overlay)
-						      'field)
-				   'boundary))
-			  (or widget-field-add-space
-			      (null (widget-get widget :size))))
-		     (1- (overlay-end overlay))
-		   (overlay-end overlay)))))
+    (and overlay
+	 (if (and (not (eq (get-char-property (overlay-end overlay)
+					      'field
+					      (widget-field-buffer widget))
+			   'boundary))
+		  (or widget-field-add-space
+		      (null (widget-get widget :size))))
+	     (1- (overlay-end overlay))
+	   (overlay-end overlay)))))
 
 (defun widget-field-find (pos)
   "Return the field at POS.