help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: window-height function lies!


From: Nikolaj Schumacher
Subject: Re: window-height function lies!
Date: Wed, 01 Oct 2008 19:50:27 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin)

Rodolfo Medina <rodolfo.medina@gmail.com> wrote:

> But, the remarkable result is that, the value returned by
> window-height turns to be *false* when the buffer contains a line
> longer that the screen width (a line that continues on the following
> line).

I was a little confused by this sentence at first.  Because no matter
how long I made the lines, `window-height' remained the same.  But then
I understood, you think it should get smaller, because fewer lines are
displayed, right?  However `window-height' is related to the window and
independent of the buffer.  It relates to `move-to-window-line', not
`goto-line'.

You might want to use:

(1+ (count-lines (window-start) (window-end)))


regards,
Nikolaj Schumacher




reply via email to

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