[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Display problems with 'before-string in overlay
From: |
Lennart Borgman (gmail) |
Subject: |
Re: Display problems with 'before-string in overlay |
Date: |
Fri, 13 Apr 2007 22:01:17 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666 |
Chong Yidong wrote:
Richard Stallman <address@hidden> writes:
At this stage of the release cycle, a grave bug is one that makes Emacs
crash, or causes really bad redisplay behaviour.
I think redisplay bugs are serious bugs.
In this case, I know what the fix is (see attached patch). The
trouble is that it's a rather big change, and likely to cause
problems, whereas the problem it corrects is not commonly encountered
(cursor positioning in multi-line overlay before/after-strings).
So I'd like to delay this till after Emacs 22.1. WDYT?
Great. I will test this and I guess I do not have to say I want it now.
I can of course not say I understand the code, but I will try to look at
it anyway.
BTW when I made a brief try to understand the code I noticed the text
property Qcomposition. That is missing from (info "(elisp) Special
Properties"). Should it not be there? Or is it something internal only?
Another little question: On w32 I failed to apply this patch with the
patch program from gnuwin32 (version 2.5.9). I wonder if this is a
problem with that patch program or something else. How do I continue
when patch fails?
Most of the patch where applied. The patch fails with the following
reject (xdisp.c.rej):
***************
*** 11933,11952 ****
Lisp_Object string;
struct glyph *stop = glyph;
int pos;
limit = make_number (pt_old + 1);
glyph = string_start;
x = string_start_x;
string = glyph->object;
! pos = string_buffer_position (w, string, string_before_pos);
! /* If STRING is from overlay, LAST_POS == 0. We skip such glyphs
! because we always put cursor after overlay strings. */
! while (pos == 0 && glyph < stop)
{
string = glyph->object;
SKIP_GLYPHS (glyph, stop, x, EQ (glyph->object, string));
if (glyph < stop)
! pos = string_buffer_position (w, glyph->object, string_before_pos);
}
while (glyph < stop)
--- 11934,11955 ----
Lisp_Object string;
struct glyph *stop = glyph;
int pos;
+ Lisp_Object overlay = Qnil;
limit = make_number (pt_old + 1);
glyph = string_start;
x = string_start_x;
string = glyph->object;
! pos = string_buffer_position (w, string, string_before_pos,
&overlay);
! /* If STRING is from overlay, skip its glyphs because we always
! put cursor after overlay strings. */
! while ((pos == 0 || !NILP (overlay)) && glyph < stop)
{
string = glyph->object;
SKIP_GLYPHS (glyph, stop, x, EQ (glyph->object, string));
if (glyph < stop)
! pos = string_buffer_position (w, glyph->object,
! string_before_pos, &overlay);
}
while (glyph < stop)
***************
*** 15858,15869 ****
if (PT == MATRIX_ROW_END_CHARPOS (row))
{
/* If the row ends with a newline from a string, we don't want
! the cursor there, but we still want it at the start of the
! string if the string starts in this row.
If the row is continued it doesn't end in a newline. */
if (CHARPOS (row->end.string_pos) >= 0)
! cursor_row_p = (row->continued_p
! || PT >= MATRIX_ROW_START_CHARPOS (row));
else if (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row))
{
/* If the row ends in middle of a real character,
--- 15861,15870 ----
if (PT == MATRIX_ROW_END_CHARPOS (row))
{
/* If the row ends with a newline from a string, we don't want
! the cursor there.
If the row is continued it doesn't end in a newline. */
if (CHARPOS (row->end.string_pos) >= 0)
! cursor_row_p = row->continued_p;
else if (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row))
{
/* If the row ends in middle of a real character,
- Re: Display problems with `before-string' in overlay, (continued)
- Re: Display problems with `before-string' in overlay, Nick Roberts, 2007/04/16
- Re: Display problems with `before-string' in overlay, Eli Zaretskii, 2007/04/15
- Re: Display problems with `before-string' in overlay, Richard Stallman, 2007/04/16
- Re: Display problems with `before-string' in overlay, Kim F. Storm, 2007/04/16
- Re: Display problems with `before-string' in overlay, Chong Yidong, 2007/04/16
- Re: Display problems with `before-string' in overlay, Eli Zaretskii, 2007/04/15
- Re: Display problems with `before-string' in overlay, Kim F. Storm, 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, Eli Zaretskii, 2007/04/15
- Re: Display problems with 'before-string in overlay, Chong Yidong, 2007/04/13
- Re: Display problems with 'before-string in overlay,
Lennart Borgman (gmail) <=
- Re: Display problems with 'before-string in overlay, Lennart Borgman (gmail), 2007/04/13
- Re: Display problems with 'before-string in overlay, Eli Zaretskii, 2007/04/12