emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FOUND CAUSE] Redisplay bug in latest CVS


From: Kim F. Storm
Subject: [FOUND CAUSE] Redisplay bug in latest CVS
Date: 16 May 2002 22:15:08 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

"Kim F. Storm" <address@hidden> writes:

> 
> Now move the cursor _below_ the space in "case 1:", ie.
> 
>     case 1:
>       X             break;
> here....^
> 
> Hit TAB.
> 
> The screen now looks like (cursor is on the `b'):
> 
>     case 1:
>       br ak;
> ?.......^
> 
> Doing C-l brings back the missing `e'.

I've tracked this bug down to a problem with x_erase_phys_cursor.

When it calls get_phys_cursor_glyph to get the glyph under the (old)
cursor, the contents of w->phys_cursor.hpos is 1 - corresponding to
the character position of the TAB the cursor was on before hitting
tab... but in the updated line, row->glyphs[][1] contains a SPACE --
so that is what x_erase_phys_cursor prints to erase the old cursor.

I'm not quite sure whether this is really the problem, or whether
some earlier code should have cleared w->phys_cursor_on_p (in
case the cursor position has been written over -- which it has
been in this case -- but that may not be true in other cases).

There are more places in the code where w->phys_cursor.hpos
is compared to row->used[TEXT_AREA] ... which seems completely
bogus to me, as hpos does not in any way take the width of
the old and new glyphs in the line into account.
To me, it seems better to compare w->phys_cursor.x
to row->x + row->pixel_width, but that doesn't account for
the widths of the old and new character(s) that were / will be
displayed at that position.

I'll try to work out a proper fix for this.  Any ideas will
be appreciated...

-- 
Kim F. Storm <address@hidden> http://www.cua.dk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]