Commit f1665bdc authored by Eli Zaretskii's avatar Eli Zaretskii

Fix window-body-width on text terminals.

 src/window.c (window_body_cols): Subtract display margins from the
 window body width on TTYs as well.  See
 http://lists.gnu.org/archive/html/help-gnu-emacs/2012-12/msg00317.html
 for the original report.
parent b764d018
2012-12-25 Eli Zaretskii <eliz@gnu.org>
* window.c (window_body_cols): Subtract display margins from the
window body width on TTYs as well. See
http://lists.gnu.org/archive/html/help-gnu-emacs/2012-12/msg00317.html
for the original report.
2012-12-25 Dmitry Antipov <dmantipov@yandex.ru>
* xdisp.c (redisplay_window): Remove inner local variable
......
......@@ -801,12 +801,12 @@ window_body_cols (struct window *w)
occupies one column only. */
width -= 1;
/* Display margins cannot be used for normal text. */
width -= WINDOW_LEFT_MARGIN_COLS (w) + WINDOW_RIGHT_MARGIN_COLS (w);
if (FRAME_WINDOW_P (f))
/* On window-systems, fringes and display margins cannot be
used for normal text. */
width -= (WINDOW_FRINGE_COLS (w)
+ WINDOW_LEFT_MARGIN_COLS (w)
+ WINDOW_RIGHT_MARGIN_COLS (w));
/* On window-systems, fringes cannot be used for normal text. */
width -= WINDOW_FRINGE_COLS (w);
return width;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment