bug-ncurses
[Top][All Lists]
Advanced

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

Re: flashing symptoms


From: Frank Heckenbach
Subject: Re: flashing symptoms
Date: Sat, 11 Nov 2000 08:49:42 +0100

Thomas Dickey wrote:

> On Thu, Nov 09, 2000 at 07:28:09AM +0100, Frank Heckenbach wrote:
> > Thomas E. Dickey wrote:
> > 
> > > On Tue, 7 Nov 2000, Frank Heckenbach wrote:
> > > 
> > > > BTW, I recently wrote a program for a similar purpose. I called it
> > > > tless (less with terminal control sequences sequences). It allows to
> > > > step forward and back through a file with escape sequences. Stepping
> > > > back is done be re-writing the complete file up to the new position,
> > > > so it's not well suited for larger files. It's quite primitive, but
> > > 
> > > you probably could improve it by checking for clear-screen control
> > > and verifying the cursor position at that point using the cursor position
> > > report if it's properly implemented.
> > 
> > Good idea. Just to make sure that I understand waht you mean:
> > 
> > - scan the buffer for occurrences of clear_screen
> > 
> > - after writing a clear_screen, get the current cursor position
> >   (this means that clear_screen doesn't necessarily put the cursor
> >   at the home position, right?) -- err, how do I get the cursor
> 
> right - that's why clear & home are often in the same initialization
> string.  Many ANSI terminals support CPR (though I saw a recent comment
> claiming it's broken in gnome-terminal ;-).  Getting the position after
> clear-screen would always have the terminal in a known state that could
> be easily reconstructed.
> 
> >   position? (I don't know so much about terminfo...)
> 
> There's some debug-code in ncurses that does that - would be simple to
> make a function that does this.  tack uses u6 and u7 (user) strings for
> this (see the comment in terminfo.src).  The code's in 
> ncurses/tty/tty_update.c,
> ifdef'd with POSITION_DEBUG (I happened to recall it since I recently fixed
> a bug in it).
>  
> > - when scrolling back, restore (with cursor_address) the cursor
> >   position after the last clear_screen, and write the buffer
> >   starting after the clear_screen
> > 
> > To facilitate multiple scrolling back, I would have to store each
> > occurrence of clear_screen, not only the last one.
> 
> yes (but probably still faster than repainting all of the characters in
> between)

I just noticed that the transcripts of my programs don't contain any
clear sequences (apart from the initialization) because of the
clearing with A_BOLD problem I posted about the other day. So this
optimization wouldn't help me much and I probably won't do it... :-(

There's no hope that ncurses will ever support clearing with A_BOLD
on terminals that allow it, is there?

Frank

-- 
Frank Heckenbach, address@hidden
http://fjf.gnu.de/
PGP and GPG keys: http://fjf.gnu.de/plan



reply via email to

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