Neil Hodgson wrote:

Robert:


As for "lazy" Undo/Redo, I went ahead and tweaked SetScrollBars() to
return a bool which will be true if a Redraw() was done.  There are a
*lot* of places (in Editor.cxx) that do a SetScrollBars() followed
immediately by a Redraw()... or there were. :)


   Does this achieve any noticeable effect? Redraw adds the client
rectangle to the invalid area of the window. If this is done twice, I
expect it would very lightweight. Unless there is a measurable effect
its not worth churning the code.

Well, other than the fact that a lot of what I have been doing in Scintilla the past few weeks has been to avoid doing [horrendously expensive] full Redraw() calls? ;)


While I definitely share your feelings about the widespread code changes, isn't this (avoiding gratuitous Redraws) what some of your code is already about - look at SetScrollBars() itself. It *could* have just blindly done an extra Redraw (or two)...

I also refined my "last step in Undo/Redo" stuff to avoid one extra Redraw() after you pointed this out.

So yes, I did think that not doing large amounts of unnecessary computation was a recurring theme here... :)

Robert Roessler
[EMAIL PROTECTED]
http://www.rftp.com
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to