emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: display margin errors on a tty


From: Chong Yidong
Subject: Re: display margin errors on a tty
Date: Sat, 14 Apr 2007 11:58:53 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.97 (gnu/linux)

Chong Yidong <address@hidden> writes:

> I managed to reproduce the bug.
>
> emacs -nw
> M-: (set-window-margins (selected-window) 1) RET
> C-x 2
> C-x ^
>
> Pressing left and right button and inserting text now makes it clear
> that redisplay is broken.
>
> The call to enlarge-window and set-window-margins appears to be
> essential to producing this bug.

I can't seem to track down this bug.  There seems to be some subtle
bug in the optimizations for reusing glyph matrices on text terminals,
which only shows up when display margins are present.  For the
release, I propose the following hack.

It forces a glyph matrix reallocation after each call to
enlarge_window.  The slowdown will be undetectable since redisplay is
so fast on text terminals anyway.

I'll try to track this down completely after the release.

Any objections?  (I'll also insert the appropriate comments explaining
the situation, of course.)

*** emacs/src/window.c.~1.575.~ 2007-03-31 10:10:14.000000000 -0400
--- emacs/src/window.c  2007-04-14 11:43:03.000000000 -0400
***************
*** 4415,4422 ****
    XSETFASTINT (p->last_modified, 0);
    XSETFASTINT (p->last_overlay_modified, 0);
  
    /* Adjust glyph matrices. */
!   adjust_glyphs (XFRAME (WINDOW_FRAME (XWINDOW (window))));
  }
  
  
--- 4415,4425 ----
    XSETFASTINT (p->last_modified, 0);
    XSETFASTINT (p->last_overlay_modified, 0);
  
+   if (!FRAME_WINDOW_P (WINDOW_XFRAME (XWINDOW (window))))
+     SET_FRAME_GARBAGED (WINDOW_XFRAME (XWINDOW (window)));
+ 
    /* Adjust glyph matrices. */
!   adjust_glyphs (WINDOW_XFRAME (XWINDOW (window)));
  }
  
  





reply via email to

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