Re: question on setting statusbar

From: Scott Weisman <sweis....at.gmail.com>
Date: Wed, 8 Dec 2010 12:59:06 -0800 (PST)

Never mind. I was running 3.4 and upgraded to 3.5 and it now works.

Plus, doing a file-open now defaults to the directory of the currently
open file. Nice.

Now I can focus on some ideas I have for search/replace. Thanks for an
awesome editor.

Scott

On Dec 8, 10:37 pm, Scott Weisman <sweis....at.gmail.com> wrote:
> I have a function to set the statusbar to the filename, and append a
> "*" when the file has been modified:
>
> function set_statusbar()
>     local buffer = buffer
>     if buffer.filename then
>         text = buffer.filename
>         if buffer.dirty == true then
>             text = text .. "*"
>         end
>         gui.statusbar_text = text
>     else
>         gui.statusbar_text = 'UNTITLED'
>     end
> end
>
> events.connect('update_ui', set_statusbar, 1)
>
> This works great until I save a modified file. Until I move the cursor
> or do something similar, the "*" remains. I tried adding this:
>
> events.connect('file_after_save', set_statusbar)
>
> But this didn't have any effect. Without a cursor more, or something
> like it, the "*" stayed. What can I do to have the statusbar updated
Received on Wed 08 Dec 2010 - 15:59:06 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:55:47 EST