[Top][All Lists]

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

bug#16470: 24.3.50; term mode and newlines with some window configuratio

From: martin rudalics
Subject: bug#16470: 24.3.50; term mode and newlines with some window configurations
Date: Thu, 23 Jan 2014 09:53:05 +0100

> I made a build with your latest changes, and it seems to work. window-width 
and window-text-width now return the same values in all window configurations I 
tried, and term.el works as expected.

OK.  Closing this bug.

> That said, I now don't see any difference between window-body-width, 
window-text-width, and window-width when the PIXELWISE argument is omitted or nil.

Correct.  IIRC this was the case with Emacs 23 as well.

The rationale is the following: Intuitively, the total width of a window
(including scrollbars, fringes, ....) should be larger than its body
width.  Now consider two side by side windows whose pixel widths equal
72 and 66 so their parent window has 138 pixels.  With a character width
of 8, the parent has 17 total columns and the larger child 9 columns.

I have to give the other window 8 columns since otherwise the sum of the
width of these windows would not match the width of their parent with
unpredictable consequences for functions like `window-edges' whose
return values are often used to check whether two windows are adjacent
to each other.

Now if the smaller of these windows has no scrollbars, fringes, margins,
dividers ... using the previous calculation would give it a body width
of 9 columns (rounding up the result of 66 / 8) exceeding its nominal
total width.

Thanks, martin

reply via email to

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