[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [zile-devel] Upcoming changes to display code
From: |
David A. Capello |
Subject: |
Re: [zile-devel] Upcoming changes to display code |
Date: |
Sun, 10 Oct 2004 23:25:12 -0300 |
User-agent: |
Mutt/1.5.6i |
On mar, oct 05, 2004 at 09:47:56 +0200, Reuben Thomas wrote:
> I have now got to the point where I have to address zile's architectural
> dependency on ncurses, namely that it updates the entire screen on every
> keypress, and relies on ncurses to optimise the display update.
>
> Any hints on how to go about this? I intend to make all the interactive
> functions that update the display do the relevant minimal (where
> possible) or maximal (where it's too complex/too much) update.
>
> Any better ideas gratefully received.
We could use two virtual screens:
1) One to know the current content of the screen;
2) One to know the new content that should be flush on the screen;
The refresh routine should compare both buffers, and update the
characters that has changes:
for (y=0; y<ROWS; y++)
for (x=0; x<COLS; x++)
if (oldbuf[y*COLS+x] != newbuf[y*COLS+x])
term_update_char (x, y, oldbuf[y*COLS+x]=newbuf[y*COLS+x]);
--
http://www.davidcapello.com.ar