From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Chong Yidong" Newsgroups: gmane.emacs.devel Subject: Problem with modeline and window margins Date: Thu, 20 Jan 2005 05:41:14 -0500 (EST) Message-ID: <1957.220.255.79.102.1106217674.squirrel@220.255.79.102> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1106218550 27811 80.91.229.6 (20 Jan 2005 10:55:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Jan 2005 10:55:50 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 20 11:55:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CrZyY-0007tv-00 for ; Thu, 20 Jan 2005 11:55:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cra9W-0004Bq-Vj for ged-emacs-devel@m.gmane.org; Thu, 20 Jan 2005 06:07:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cra1S-0001xA-5D for emacs-devel@gnu.org; Thu, 20 Jan 2005 05:58:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cra0u-0001Lr-9I for emacs-devel@gnu.org; Thu, 20 Jan 2005 05:58:09 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cra0X-0000qP-W1 for emacs-devel@gnu.org; Thu, 20 Jan 2005 05:57:46 -0500 Original-Received: from [64.21.80.18] (helo=shark.dnsvelocity.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CrZmO-0006fA-6J for emacs-devel@gnu.org; Thu, 20 Jan 2005 05:43:08 -0500 Original-Received: from stupidch by shark.dnsvelocity.com with local (Exim 4.43) id 1CrZkY-0007bX-4H for emacs-devel@gnu.org; Thu, 20 Jan 2005 05:41:14 -0500 Original-Received: from 220.255.79.102 ([220.255.79.102]) (SquirrelMail authenticated user cyd@stupidchicken.com); by www.stupidchicken.com with HTTP; Thu, 20 Jan 2005 05:41:14 -0500 (EST) Original-To: emacs-devel@gnu.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a X-Priority: 3 (Normal) Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - shark.dnsvelocity.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [32675 33085] / [47 12] X-AntiAbuse: Sender Address Domain - shark.dnsvelocity.com X-Source: /usr/local/cpanel/3rdparty/bin/php X-Source-Args: /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/base/3rdparty/squirrelmail/src/compose.php X-Source-Dir: stupidchicken.com:/base/3rdparty/squirrelmail/src X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32413 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32413 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.) The following patch for xterm.c seems to fix the bug, but someone ought to check it. The corresponding patches for w32term.c and macterm.c are straightforward. --- xterm.c Thu Jan 20 18:37:15 2005 +++ xterm.c~ Thu Jan 20 18:26:16 2005 @@ -2131,18 +2131,14 @@ 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); - /* window_box_right excludes the right margin, so we add it. */ - if (INTEGERP (s->w->right_margin_cols)) - last_x += XFASTINT (s->w->left_margin_cols) - * WINDOW_FRAME_COLUMN_WIDTH (s->w); } /* The glyph that may have a right box line. */ last_glyph = (s->cmp || s->img ? s->first_glyph : s->first_glyph + s->nchars - 1);