From xemacs-m  Sun Mar 23 13:24:46 1997
Received: from xemacs.cs.uiuc.edu (localhost [127.0.0.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id NAA08452;
	Sun, 23 Mar 1997 13:24:45 -0600 (CST)
Message-Id: <199703231924.NAA08452@xemacs.org>
To: Darrell Kindred <dkindred@cmu.edu>
cc: xemacs-beta@xemacs.org
Subject: Re: gdb-mode cursor bug [w/ patch] 
In-reply-to: Your message of "Sun, 23 Mar 1997 00:48:47 EST."
             <9703230548.AA43428@GS213.SP.CS.CMU.EDU> 
Date: Sun, 23 Mar 1997 13:24:44 -0600
From: Chuck Thompson <cthomp@xemacs.org>

    Darrell> The patch below fixes both of these glitches.  It's not
    Darrell> critical, so it's probably best to just apply it to 20.1.

Cursor handling is a nightmare.  Amazingly it is easier than in
previous redisplay engines.  Now it is just impossible instead of
really impossible.

In any case, the patch will probably cause some display glitches under
certain circumstances (overlapping display blocks).  I would suggest
trying something like this (completely untested):

  /* If the new block type is not text and the cursor status is
     changing and it overlaps the position of this block then force a
     full redraw of the block in order to make sure that the cursor is
     updated properly. */
  if (ddb->type != TEXT
      && (cdl->cursor_elt != ddl->cursor_elt == -1)
      && (ddl->cursor_elt == -1 ||
          (cursor_start
           && cursor_width
           && (cursor_start + cursor_width) >= start_pixpos
           && cursor_start <= block_end)))
    force = 1;

