Re: [fltk/fltk] Intermittent crash from Fl_Simple_Terminal dtor on Windows (#89)
erco77
Sep 16, 2020
Here's what the code looked like before Matt's change, which is perhaps more what I'd expect, though there's still a call to the buffer_modified_cb().. the comment above that section seems to describe /why/ this is done (to "clear it off the display"):
/* If the text display is already displaying a buffer, clear it off
of the display and remove our callback from it */
if ( buf == mBuffer) return;
if ( mBuffer != 0 ) {
buffer_modified_cb( 0, 0, mBuffer->length(), 0, 0, this );
mNBufferLines = 0;
mBuffer->remove_modify_callback( buffer_modified_cb, this );
mBuffer->remove_predelete_callback( buffer_predelete_cb, this );
}
Perhaps some tests to see what happens if one doesn't invoke the buffer_modified_cb() when switching between text buffers, just to see what happens on the display. I would think the screen should update to whatever the /new/ text buffer contains, and if the buffer is NULL, e.g. buffer(0), the screen should be empty.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.