Re: How to test whether a window is placed just above the command-line?
- On Thu, 2004-11-04 at 14:36, Antoine J. Mechelynck wrote:
> Paul Bolle <pebolle@...> wrote:You seem to be correct.
> > How should you test whether a window is placed just above the
> > command-line?
> > I'm trying to write a hack for src/ui.c. For this hack I need to test
> > whether a window is at the bottom of the screen (directly above the
> > command-line). Something like "mywin == lastwin" seems to work
> > correctly with horizontally split windows. However it does not work
> > with vertically split windows that are placed directly above the
> > command line as only one of those windows seems to qualify as
> > "lastwin".
> I believe the following (untested) will return nonzero if and only the
> current window is the last one
> function InLastWindow()
> wincmd w
> let result = (winnr() == 1)
> wincmd W
> return result
However, I'm looking for a way to test (in C) whether a window is at the
bottom of the screen. (A comparable vim function could be called
something like: "JustAboveCommandLine()".)