bug-ncurses
[Top][All Lists]
Advanced

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

Re: Addch() eats spaces and tabs on the last line of a window


From: Stephan Beal
Subject: Re: Addch() eats spaces and tabs on the last line of a window
Date: Thu, 2 Apr 2009 14:06:45 +0200

On 4/2/09, karim hamidou <address@hidden> wrote:
> The display code is extremely simple, it is something along the lines of :
> while(c = next_character_in_buffer()) {
>         addch(c->value);
> }

To me it sounds like your main window is not scrollable
(scrollok(mywin,true)). i'm using essentially the same code as above
(for redirecting std::cout and std::cerr to a curses window, via the
std::streambuffer interface), and it "just works", but it requires
that the target window be scrollable. If the window is not scrollable,
and you want to handle the scrolling yourself (sounds reasonable for a
text editor), you'll have to check "am i adding to the bottom/right
corner?" and handle the scrolling in some custom manner.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/




reply via email to

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