emacs-devel
[Top][All Lists]
Advanced

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

Problem with modeline and window margins


From: Chong Yidong
Subject: Problem with modeline and window margins
Date: Thu, 20 Jan 2005 05:41:14 -0500 (EST)
User-agent: SquirrelMail/1.4.3a

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);





reply via email to

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