diff options
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/window.c | 10 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index dfe3e3818eb..a2b78cf5679 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +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 diff --git a/src/window.c b/src/window.c index a7d30b7a467..3fca5b7351e 100644 --- a/src/window.c +++ b/src/window.c @@ -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; } |
