[code] Re: How can I tweak the text shown on Textadept's titlebar?

From: Russell Dickenson <russelldickenson.att.gmail.com>
Date: Tue, 28 May 2013 08:43:26 +1000

Sorry - I somehow sent my previous message before I had finished composing
it. :O

I want to modify the text so that it's <FILENAME> (FILEPATH) - Textadept

Is there a native function for obtaining a given file's path?

On 28 May 2013 08:40, Russell Dickenson <russelldickenson.att.gmail.com> wrote:

> I want to change the text shown on Textadept's titlebar so that the name
> of the open file is not repeated. I have found where in the code this is
> set, but don't know how to achieve what I want.
> The code I have found is as follows (from gui.lua)
> -- Sets the title of the Textadept window to the buffer's filename.
> -- @param buffer The global buffer.
> local function set_title()
> local filename = buffer.filename or buffer._type or _L['Untitled']
> local basename = buffer.filename and filename:match('[^/\\]+$') or
> filename
> gui.title = string.format('%s %s Textadept (%s)', basename,
> buffer.dirty and '*' or '-', filename)
> end

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 Mon 27 May 2013 - 18:43:26 EDT

This archive was generated by hypermail 2.2.0 : Tue 28 May 2013 - 06:44:55 EDT