all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Problem with modeline and window margins
Date: Thu, 20 Jan 2005 14:06:20 +0100	[thread overview]
Message-ID: <m3hdlc1c8j.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <1957.220.255.79.102.1106217674.squirrel@220.255.79.102> (Chong Yidong's message of "Thu, 20 Jan 2005 05:41:14 -0500 (EST)")

"Chong Yidong" <cyd@stupidchicken.com> 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 <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2005-01-20 13:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-20 10:41 Problem with modeline and window margins Chong Yidong
2005-01-20 13:06 ` Kim F. Storm [this message]
2005-01-20 14:42   ` Chong Yidong
2005-01-21 20:09     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3hdlc1c8j.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.