[Top][All Lists]

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

Scrolling behaviour

From: Ben Kohlen
Subject: Scrolling behaviour
Date: Fri, 19 Oct 2001 02:12:45 -0700 (PDT)

I would expect that the following code fragment:
w = newwin(1, COLS, 0, 0);
scrollok(w, 1);
wprintw(w, "foo"); wrefresh(w);
waddch(w, '\n'); wrefresh(w);
would give me 1 second of "foo" displayed at the top
of my terminal, followed by the window becoming
entirely blank (as it is only 1 line, the "foo" should
have scrolled off the top immediately).  What I get
instead after the first second, is that the cursor
simply moves to the beginning of the line.

wprintw()ing or waddch()ing more chars overwrites the
original foo. waddch()ing another newline does blank
the WINDOW*, and thus is a very simple workaround,
with no(?) side effects.

This behaviour is consistent with xterm and linux
console on x86.  Position of the WINDOW* does not seem
to matter.

With the nlines parameter of newwin() set larger than
1, scrolling happens quite as expected - lines move up
the screen and then disappear off the top.


Do You Yahoo!?
Make a great connection at Yahoo! Personals.

reply via email to

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