[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Display problems with 'before-string in overlay
From: |
Kim F. Storm |
Subject: |
Re: Display problems with 'before-string in overlay |
Date: |
Thu, 12 Apr 2007 19:01:57 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.97 (gnu/linux) |
Chong Yidong <address@hidden> 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 <address@hidden> http://www.cua.dk
- Re: Display problems with 'before-string in overlay, (continued)
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/14
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/14
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/15
- Re: Display problems with 'before-string in overlay, Chong Yidong, 2007/04/15
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/15
- Re: Display problems with 'before-string in overlay, Richard Stallman, 2007/04/16
- Re: Display problems with 'before-string in overlay, Richard Stallman, 2007/04/15
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/12
- Re: Display problems with 'before-string in overlay, Chong Yidong, 2007/04/12
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/12
- Re: Display problems with 'before-string in overlay,
Kim F. Storm <=
- Re: Display problems with 'before-string in overlay, Chong Yidong, 2007/04/12
- Re: Display problems with 'before-string in overlay, Kim F. Storm, 2007/04/12
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/12
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/12
- Re: Display problems with 'before-string in overlay, Chong Yidong, 2007/04/12
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/12
- Re: Display problems with 'before-string in overlay, Chong Yidong, 2007/04/12
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/12
- Re: Display problems with 'before-string in overlay, Chong Yidong, 2007/04/12
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/12