Neil Hodgson wrote:
When testing, I often wonder which style a text segment actually got.
Some styles may be hard to distinguish, on purpose or not.

   Another approach is to add an OnUpdateUI handler that shows the
style after the caret in the status line.

function OnUpdateUI()
  props["CurrentStyle"] = editor.StyleAt[editor.CurrentPos]
end

   Then define the status line:

statusbar.text.1=Style=$(CurrentStyle)

Excellent tip, for some reason, I haven't thought that Lua could set properties that could be used in the status bar!
This opens lot of possibilities.
Also we can easily display an explicit string instead of a simple number.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to