emacs-devel
[Top][All Lists]
Advanced

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

Re: Problem with modeline and window margins


From: Kim F. Storm
Subject: Re: Problem with modeline and window margins
Date: Thu, 20 Jan 2005 14:06:20 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

"Chong Yidong" <address@hidden> writes:

> Regarding the following item from FOR_RELEASE:
>
>> ** Problem with modeline and window margins:
>>
>> The mode line's right "box" line is misplaced under the right margin,
>> rather than at the right window edge.
>>
>> emacs -Q
>> (set-window-margins nil 25 25)
>> C-x 2
>
> The problem seems to be that x_draw_glyph_string_box finds the right-hand
> edge of the box by calling window_box_right. However, the value returned
> by window_box_right stops at the right margin (see the definition of
> window_box_width.)

Thank you very much for tracking this down -- it has been bugging me for a 
while.

Your patch looks ok, but I think it can be done simpler.  Can you try this
patch instead:

*** xterm.c     01 Jan 2005 13:35:03 +0100      1.855
--- xterm.c     20 Jan 2005 13:56:13 +0100      
***************
*** 2127,2141 ****
    struct glyph *last_glyph;
    XRectangle clip_rect;
  
-   last_x = window_box_right (s->w, s->area);
    if (s->row->full_width_p
        && !s->w->pseudo_window_p)
!     {
!       last_x += WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w);
!       if (s->area != RIGHT_MARGIN_AREA
!         || WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (s->w))
!       last_x += WINDOW_RIGHT_FRINGE_WIDTH (s->w);
!     }
  
    /* The glyph that may have a right box line.  */
    last_glyph = (s->cmp || s->img
--- 2127,2137 ----
    struct glyph *last_glyph;
    XRectangle clip_rect;
  
    if (s->row->full_width_p
        && !s->w->pseudo_window_p)
!     last_x = WINDOW_RIGHT_EDGE_X (s->w);
!   else
!     last_x = window_box_right (s->w, s->area);
  
    /* The glyph that may have a right box line.  */
    last_glyph = (s->cmp || s->img


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





reply via email to

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