Status line update from Lua

27 views
Skip to first unread message

Robin

unread,
May 5, 2011, 9:32:18 AM5/5/11
to scite-i...@googlegroups.com
How does one update the status line from Lua?

For example, if in Lua I set a property using

props["myprop.example"] = myvalue

how can the status line that contains a reference to

... $(myprop.example) ...

be updated?

I can always press the up/down arrow, etc., but I would like to have the status line updated via code.

Thank you.

mozers

unread,
May 5, 2011, 3:01:58 PM5/5/11
to Robin
Thursday, May 5, 2011, 5:32:18 PM, Robin wrote:
> How does one update the status line from Lua?

Here working example:

SciTEStartup.lua:
-----------------
function OnDwellStart(pos, word)
props["current.word"]=word
scite.UpdateStatusBar()
end
props["dwell.period"] = 50

SciTEUser.properties:
---------------------
statusbar.visible=1
statusbar.number=1
statusbar.text.1=\
Line $(LineNumber) Col $(ColumnNumber)\
| Select: $(SelHeight) lines $(SelLength) bytes\
| $(OverType)\
| $(EOLMode)\
| $(current.word)

--
mozers
<http://scite-ru.org>

Robin

unread,
May 7, 2011, 9:40:48 AM5/7/11
to scite-i...@googlegroups.com
Thanks. That worked great.
Reply all
Reply to author
Forward
0 new messages