Nick Treleaven:
I've working on a lightweight IDE, making it scroll a certain line to 1/3 of the view of the editor widget. We used to just send SCI_GOTOLINE in response to a GtkTreeView click - now we are using SCI_LINESCROLL to get the line in exactly the right place. My problem is we have code that may cause an initial scroll in reponse to SCI_GOTOLINE, but also code after a SCN_PAINTED notification that calls SCI_LINESCROLL.
It would be better to avoid reentrant paints within the SCN_PAINTED notification. The problem with just deleting the update region when a reentrant paint occurs is that the original update region is required by the painting code to ensure accurate and efficient painting. You may see drawing glitches or crashes if it is just reset. At the point of the SCN_PAINTED, this code has finished using the update region but the code you have changed does not know this. A safer change would be to prevent the synchronous painting in Editor::ScrollTo by calling Redraw rather than ScrollText if the update region is not NULL. Neil _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
