Neil Hodgson
2014-05-12 10:35:11 UTC
Way back in 2007 'modern' indicators were introduced along with warnings that style byte indicators were deprecated, would be removed in the *next version* and should not be used by applications. I noticed today that some of the core drawing logic could be simplified and memory use decreased by removing style byte indicator support.
Hopefully everyone has removed all actual use of style byte indicators but I expect all are still calling SCI_SETSTYLEBITS, just like SciTE, using the result from SCI_GETSTYLEBITSNEEDED. Moving these functions into the deprecated category would produce a compile error. While this could indicate a problem if the application was really using style byte indicators, its almost certain that this would just break innocent code that was simply copying examples.
There may be advantages to knowing roughly how many styles are possible for the application to minimize memory use or processing. If so it may be worth continuing to return a lexer-appropriate value from SCI_GETSTYLEBITSNEEDED. An alternative would be to always return 8.
So, I'd like to change SCI_SETSTYLEBITS to perform no action and SCI_GETSTYLEBITS to always return 8. Document this new behaviour and discourage calling these functions.
Neil
Hopefully everyone has removed all actual use of style byte indicators but I expect all are still calling SCI_SETSTYLEBITS, just like SciTE, using the result from SCI_GETSTYLEBITSNEEDED. Moving these functions into the deprecated category would produce a compile error. While this could indicate a problem if the application was really using style byte indicators, its almost certain that this would just break innocent code that was simply copying examples.
There may be advantages to knowing roughly how many styles are possible for the application to minimize memory use or processing. If so it may be worth continuing to return a lexer-appropriate value from SCI_GETSTYLEBITSNEEDED. An alternative would be to always return 8.
So, I'd like to change SCI_SETSTYLEBITS to perform no action and SCI_GETSTYLEBITS to always return 8. Document this new behaviour and discourage calling these functions.
Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.