[gnu.emacs.bug] problem with reverse i-search?

cph@KLEPH.AI.MIT.EDU (Chris Hanson) (05/17/89)

A problem I noticed recently with reverse i-search is that the C-w and
C-y characters have an unusual behavior: when used, if the length of
the text added to the search string is greater than one character, the
search skips to the previous instance of the string.  However, if the
length of the text is exactly one character, it just extends the
search text without moving.

I believe this is because the following (from line 246 of
"/gp/gnu/emacs/lisp/isearch.el") is incorrect:

	      ;; Not regexp, not reverse, or no match at point.
	      (if (and other-end (not adjusted))
		  (goto-char (if forward other-end
			       (min opoint barrier (1+ other-end)))))

The subexpression `(1+ other-end)' does not take into account the
length of the text being added to the search string.  If this is fixed
to do so the effect of the C-w and C-y characters should be consistent
independent of the length of the added text.