Re: [code] Improved File Browser

From: Mitchell <m.att.foicica.com>
Date: Sun, 7 Oct 2018 13:34:59 -0400 (EDT)

Hi Alexander,

On Fri, 5 Oct 2018, Alexander Misel wrote:

> I did the following patches to make File Browser work after reopening Textadept.
> init.patch is applied to modules/file_browser/init.lua
> session.patch is applied to modules/textadept/session.lua
>
> Things I fixed include:
>
> 1. Restoring file browser session after reopen
> 2. False indent if the first item in a folder is a folder (expand that folder would result in the files inside it become same level as the parent folder)

Thanks for the contribution! Rather than patching Textadept's *session.lua* module, I recommend patching the file_browser module's *init.lua* to use "[File Browser - path/to/dir]" rather than "[File Browser] - path/to/dir". Hopefully that wouldn't be too difficult.

> Some issues I found in File Browser:
>
> 1. The last folder inside a folder cannot be colored

It's probably trivial to fix. Look for `buffer:set_styling()` calls and see if a loop exits prematurely.

> 2. After switching buffers, the colors in File Browser disappears

You'll have to set up whatever is performing the styling to do so again in an `events.BUFFER_AFTER_SWITCH` event. This may be more complicated than it initially seems.

When you're happy with your changes, I would encourage you to update the wiki page[1] by clicking on the page's title and following the edit instructions.

Cheers,
Mitchell

[1]: https://foicica.com/wiki/ta-filebrowser

-- 
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 Sun 07 Oct 2018 - 13:34:59 EDT

This archive was generated by hypermail 2.2.0 : Mon 08 Oct 2018 - 06:38:20 EDT