Chong Yidong <[EMAIL PROTECTED]> writes:

> I think the current code is mistaken.  The ChangeLog entry and the
> comments both say that we want to set cursor_row_p to a non-zero value
> in the case where the display string starts in this row.  But that's
> not what it's doing; Lennart is correct in pointing out that it's
> setting cursor_row_p unconditionally, since
>
>    PT == MATRIX_ROW_END_CHARPOS (row) implies
>    PT >= MATRIX_ROW_START_CHARPOS (row).
>
> To actually do what the comments and ChangeLog say we want to do, we
> would have to scan backward in the glyph row for the beginning of the
> string, which would be significantly more complicated than the current
> code.
>
> For the Emacs 22 release, maybe we should simply revert this change to
>
>       cursor_row_p = row->continued_p;
>
> It does not cause the original 2005 bug report to reappear, and it
> doesn't seem to affect anything else as far as I can tell.
>
> WDYT?

IIRC, the original problem I tried to solve is shown by this test-case:

(progn
  (switch-to-buffer (get-buffer-create "*test*"))
  (erase-buffer)
  (insert ".\n<\n.\n>\n")
  (goto-char (point-min))
  (let ((ov (make-overlay 4 7)))
      (overlay-put ov 'display "Ax\nyB"))
  (goto-char (point-max)))

With my change, moving the cursor places it on the 'A'.

Without my change, moving the cursor places it on the 'y'.

So my change may be incorrect - but it _does_ solve a real problem.

--
Kim F. Storm <[EMAIL PROTECTED]> http://www.cua.dk



_______________________________________________
emacs-pretest-bug mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to