Re: [code] How can I tweak the text in the status bar?

From: Russell Dickenson <russelldickenson.att.gmail.com>
Date: Fri, 17 May 2013 00:15:45 +1000

Mitchell,

Oh wow... That's so much information that I was expecting. Thankyou.

On 16 May 2013 23:10, Mitchell <m.att.foicica.com> wrote:

> Russell,
>
>
> On Thu, 16 May 2013, Russell Dickenson wrote:
>
> OK - thanks to Brian I have found the following code, which looks to be
>> the
>> section I ought to tweak. What I don't understand is: how can I have the
>> text start from the left-hand side, and not right-aligned?
>>
>> local text = not CURSES and '%s %d/%d %s %d %s %s %s %s'
>> or
>> '%s %d/%d %s %d %s %s %s %s'
>> gui.docstatusbar_text = string.format(text, _L['Line:'], line, max,
>> _L['Col:'], col, lexer, eol, tabs,
>> enc)
>>
>
> I would recommend connecting to an `events.UPDATE_UI` event in your
> init.lua and updating `gui.statusbar_text` there rather than modifying
> anything in *core/gui.lua*. `gui.statusbar_text` starts from the left,
> unlike the docstatusbar which is to the right. From the same handler, you
> can set `gui.docstatusbar_text` to the empty string if you don't like
> seeing it. Something like:
>
> events.connect(events.UPDATE_**UI, function()
> gui.statusbar_text = 'whatever you want'
> gui.docstatusbar_text = '' -- clear it
> end)
>
> Keep in mind that the left part of the statusbar normally shows
> informative messages which could be over-written by this event handler.
>
> I hope that helps.
>
> Cheers,
> Mitchell
> --
> You are subscribed to code.att.foicica.com.
> To change subscription settings, send an e-mail to code+help.att.foicica.com.
> To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
>
>

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 16 May 2013 - 10:15:45 EDT

This archive was generated by hypermail 2.2.0 : Fri 17 May 2013 - 06:52:53 EDT