emacs-devel
[Top][All Lists]
Advanced

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

[PATCH] Re: Display bug using bold/italic faces & header line


From: Kim F. Storm
Subject: [PATCH] Re: Display bug using bold/italic faces & header line
Date: 16 Jul 2002 02:08:25 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

David Ponce <address@hidden> writes:

> There is a nasty bug in the display engine of the latest CVS version
> of Emacs 21 that displays garbaged text in buffers when scrolling up.

I saw that too.

C-h i C-v C-v M-v M-v 

is enough to reproduce.

> 
> It seems that the following changes in xdisp.c caused the bug:
> 
> 2002-07-07  Richard M. Stallman  <address@hidden>
> 
> * xdisp.c (make_cursor_line_fully_visible): Don't try short scrolls.
> Instead just return 0 when there is something to be done.
> (try_scrolling): If make_cursor_line_fully_visible returns 0,
> retry scrolling as if cursor were off the bottom.
> (try_cursor_movement): If make_cursor_line_fully_visible returns 0,
> return CURSOR_MOVEMENT_MUST_SCROLL.
> (redisplay_window): If make_cursor_line_fully_visible returns 0,
> go to try_to_scroll.
> 

Yes, the problems are definitely related to those changes.  I cannot
see from the changelog why these changes were needed, but I assume
they solved some problem...  Richard, do you recall which?

The following patch seems to fix the present problems by undoing two
of these changes.  However, without knowledge about what the original
change was supposed to fix, I don't know if my patch reintroduces that
problem.  Also, my patch may be incomplete in the sense that there are
still cases which display incorrectly...


Index: xdisp.c
===================================================================
RCS file: /cvs/emacs/src/xdisp.c,v
retrieving revision 1.765
diff -c -r1.765 xdisp.c
*** xdisp.c     15 Jul 2002 20:37:12 -0000      1.765
--- xdisp.c     15 Jul 2002 22:58:54 -0000
***************
*** 10056,10062 ****
                  set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
                  try_window (window, startp);
                  if (!make_cursor_line_fully_visible (w))
!                   rc = CURSOR_MOVEMENT_MUST_SCROLL;
                  else
                    rc = CURSOR_MOVEMENT_SUCCESS;
                }
--- 10056,10062 ----
                  set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
                  try_window (window, startp);
                  if (!make_cursor_line_fully_visible (w))
!                   rc = CURSOR_MOVEMENT_NEED_LARGER_MATRICES;
                  else
                    rc = CURSOR_MOVEMENT_SUCCESS;
                }
***************
*** 10347,10353 ****
        }
  
        if (!make_cursor_line_fully_visible (w))
!       goto try_to_scroll;
  #if GLYPH_DEBUG
        debug_method_add (w, "forced window start");
  #endif
--- 10347,10353 ----
        }
  
        if (!make_cursor_line_fully_visible (w))
!       goto need_larger_matrices;
  #if GLYPH_DEBUG
        debug_method_add (w, "forced window start");
  #endif


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




reply via email to

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