changeset 8381:9d751556d1c7

(mouse-choose-completion): Check for next-single-property-change returning nil.
author Richard M. Stallman <rms@gnu.org>
date Fri, 29 Jul 1994 21:42:41 +0000
parents 40ab7df62402
children 425ac5eebc19
files lisp/mouse.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Fri Jul 29 21:35:56 1994 +0000
+++ b/lisp/mouse.el	Fri Jul 29 21:42:41 1994 +0000
@@ -1204,7 +1204,8 @@
 	  (if (null beg)
 	      (error "No completion here"))
 	  (setq beg (previous-single-property-change beg 'mouse-face))
-	  (setq end (next-single-property-change end 'mouse-face))
+	  (setq end (or (next-single-property-change end 'mouse-face)
+			(point-max)))
 	  (setq choice (buffer-substring beg end)))))
     (let ((owindow (selected-window)))
       (select-window (posn-window (event-start event)))