In my environment, I can only enter 130 single-byte characters in one line in the actual buffer while window-width
is returning 160. Apparently window-width
is returning columns, not characters. Is there a way to convert columns to number of characters or to calculate the number using the columns and some attributes of current font?(for now, only the case of fixed-width one)
Actual reference values are:
window-width
: 159
window-total-width
: 160
window-pixel-width
: 1602
window-font-width
: 10