Win32: ListBoxX::GetDesiredRect should use correct technology to measure width
Fixed in v5.5.6.
Update for endStyled += length; isn't consistent: one before the notification one after.
OK.
truncation can be used to simplify lexer: StyleContext could use styler.ColourTo(currentPos - 1, state); instead of styler.ColourTo(currentPos - ((currentPos > lengthDocument) ? 2 : 1), state);. trailing word classify block (e.g. in LexHTML) could be omitted by increase end position/length like StyleContext does. for LexHTML it's only needed for PHP where ?> can be omitted and is preferred to avoid extra content.
(position < 0) || (length <= 0) || ((position + length) > style.Length()) assuming initial (after call Document::StartStyling()) endStyled is within document position range, this changed previously truncation behavior, though updated endStyled may larger then document length. Setting styles for positions outside the range of the buffer is safe and has no effect.
Source code with your CopyBytes is shorter (msvc cl /utf-8 /W4 /c /EHsc /std:c++20 /O2 /GS- /GR- /FAcs /DNDEBUG /I../include CellBuffer.cxx not inline CopyBytes), but msvc generated asm with my SetStylesRange is shorter. changes compared to SetStyles0319Range.diff. - ++length; - if (index < length) { + if (index <= length) { + ++length; template <bool segment1> void SetStyleRange(char *data, char styleValue, Sci::Position length, StyleChangeRange &range, Sci::Position position) noexcept { Sci::Position...
parallelized (also find_first_not_of and find_last_not_of) looks overkill for a 4KB range.