Neil Hodgson wrote:
   When adding indicators over a lexed buffer, it is important to
restore the style end position as described in
http://mailman.lyra.org/pipermail/scintilla-interest/2005-April/006085.html

Thanks. For the benefit of the list, the code in the above is:

  es = GetEndStyled()
  StartStyling(pos,INDIC0_MASK)
  SetStyling(len,INDIC0_MASK)
  StartStyling(es,31)

Correcting (touch wood!) the Lua example:

  editor.IndicFore[1] = tonumber("0000FF", 16)
  editor.IndicStyle[1] = INDIC_SQUIGGLE
  local function underline_text(pos,len,ind)
    local es = editor.EndStyled
    editor:StartStyling(pos,ind)
    editor:SetStyling(len,ind)
    editor:StartStyling(es,31)
  end
  underline_text(0,100,INDIC1_MASK)

The change in editor:StartStyling(pos,ind) masks out the indicator(s) being changed instead of all three default indicator bits (with INDICS_MASK) in the previously posted example. Reference information is in ScintillaDoc.html.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to