[Top][All Lists]

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

Re: flashing symptoms

From: Frank Heckenbach
Subject: Re: flashing symptoms
Date: Thu, 9 Nov 2000 07:28:09 +0100

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
  position? (I don't know so much about terminfo...)

- 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.

Is this correct?


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

reply via email to

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