On Fri, May 06, 2005 at 08:19:06PM +0200, Andre Poenitz wrote: > On Fri, May 06, 2005 at 04:01:26PM +0100, Angus Leeming wrote: > > As soon as you have acknowledged the recursive nature of the current > > update(), then something like this was bound to be needed. Well done for > > getting to grips with it all. > > I understand (now) that update() might be called recursively (again). > However, this does not serve any purpose but rather should be considered > a bug. > > Maybe a simple solution would be something like > > > ... update() > { > static bool in_update = false; > static bool update_was_canceled = false; > > if (in_update) { > update_was_canceled = true; > return; > } > > in_update = true; > do { > update_was_canceled = false; > > ... do current update stuff > > } while (!update_was_canceled); > } > > The idea is that a nested update does nothing but inform the outermost > update that it has to retry.
I didn't try precisely that, but I did (in update) put in a test for isUpdating() and returning if true. Didn't help with the cursor up/down crash though. Might be good to have anyway. It was just inside the if (buffer_) statement. > Could anybody who is getting these 'fast typing crashes' reliably please > try that? > > Andre'
pgp5nJcXam28o.pgp
Description: PGP signature