[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (pos-visible-in-window-p t nil t) returns wrong position/is suboptim
From: |
Alan Mackenzie |
Subject: |
Re: (pos-visible-in-window-p t nil t) returns wrong position/is suboptimally documented. |
Date: |
Wed, 30 Sep 2015 08:56:11 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello, Eli.
On Wed, Sep 30, 2015 at 10:21:21AM +0300, Eli Zaretskii wrote:
> > Date: Sun, 27 Sep 2015 14:06:35 +0300
> > From: Eli Zaretskii <address@hidden>
> > Cc: address@hidden
> >
> > > Date: Sun, 27 Sep 2015 10:40:41 +0000
> > > From: Alan Mackenzie <address@hidden>
> > >
> > > Which is correct? The function or the documentation?
> >
> > The function. This has always worked like that.
> I've clarified the documentation to match what the function does in
> that case.
> Thanks.
Thank you!
However:
"If POSITION is `t', that means to check the first visible position
of the last visible screen line in WINDOW."
doesn't seem quite right. If the text in the window is scrolled such
that EOB is in the middle of the window, POSITION t gives the
coordinates of the last line containing text, not the last visible
screen line. How about something like:
"If POSITION is `t', that means to check the first visible position
of the last visible screen line in WINDOW which is at or above the
end of the window's buffer."
?
-------------------------------------------------------------------------
However 2: I think there's a bug in the functionality, too. If there is
o - a text buffer
o - with no terminating LF on its last line, and
o - that last line is above the window's last line
then (pos-visible-in-window t nil t) returns the coordinates of the last
lines's EOL. This is the case in both a Linux virtual terminal and an X
windows session.
--
Alan Mackenzie (Nuremberg, Germany).