Robert Roessler:
> Anyway, I am finding that setting an INDICATOR (0x80 or 0x40) on the
> second char of a line always displays it starting on the first char
> (the third position on works fine)... if I use the exact code (with
> 0x1F instead of 0xE0 as the mask) to display a STYLE (2) in the same
> position, it displays correctly!
This is a Scintilla drawing bug. The code that extracts indicator
ranges from styling is a bit complex. In SciTE, the following settings
and scripts can help reproduce the problem:
command.name.0.*=Highlight 1 and 2
command.mode.0.*=subsystem:lua,savebefore:no
command.0.*=Highlight1And2
command.name.1.*=Remove highlights
command.mode.1.*=subsystem:lua,savebefore:no
command.1.*=RemoveHighlight
function UnderlineText(pos,len,ind)
local es = editor.EndStyled
editor:StartStyling(pos, INDICS_MASK)
editor:SetStyling(len, ind)
editor:StartStyling(es, 31)
end
function Highlight1And2()
for i = 0, editor.Length do
if (editor.CharAt[i] == 49) or (editor.CharAt[i] == 50) then
UnderlineText(i, 1, INDIC0_MASK)
end
end
end
function RemoveHighlight()
local es = editor.EndStyled
editor:StartStyling(0, INDICS_MASK)
editor:SetStyling(editor.Length, 0)
editor:StartStyling(es,31)
end
The OCaml lexer fails with an assertion in debug builds as it tries
to style one beyond the end of the buffer with
styler.ColourTo(i, state);
Neil
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest