Hi,

it just occured to me that asynchronous updates and scrolling optimization
don't work.  I deluded myself before when convincing myself that it would
work.

The problem is the following sequence:

Writing "abcdefg", moving cursor back to "a".  => FILE_CHANGE_WRITE
Delete three characters, leading to "defg   ". => FILE_CHANGE_TRUNCATE, 
FILE_CHANGE_EXTEND

Now the client side.  Imagine it starts to process the updates _after_ the
above has happened.

FILE_CHANGE_WRITE => Read from memory "defg   ", and update screen.
FILE_CHANGE_TRUNCATE, FILE_CHANGE_EXTEND => Detect deletion of three
characters, leading to "g      ".  Oops.

The problem is that just before any scrolling, you need a synchronization
between server and client.  This is not so good.  I guess I will just change
this to normal WRITE notifications.  The scrolling of the whole screen (when
writing past the end of it) is done by incrementing CUR_LINE anyway, and so
the above mentioned scrolling (deletion/insertion of characters and lines)
doesn't happen too often anyway.  Mmmh.  Maybe it is used a lot in text
editors like emacs (OTOH, the ncurses man pages seems to discourage it
because it causes flicker).  I will check that out.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED]
Marcus Brinkmann              GNU    http://www.gnu.org    [EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.marcus-brinkmann.de

_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to