[code] Re: io.snapopen() not working in Textadept 7.2

From: Ryan Pusztai <rpusztai.att.gmail.com>
Date: Mon, 5 May 2014 14:23:32 -0400

Hi Again,

On Mon, May 5, 2014 at 1:44 PM, Ryan Pusztai <rpusztai.att.gmail.com> wrote:

> Hi,
>
> I am not able to use
> `io.snapopen( nil, nil, nil, { title = "Open Current Project", width =
> ui.size[1] - 100 } )`
> in the latest version. I tried to debug it and the logic seems good, but
> "paths" is not getting set. It is always nil even after you set it to
> "io.get_project_root()". I can't figure out why.
> I change the code from:
> if not paths then paths = io.get_project_root() end
> to:
> local paths = paths or io.get_project_root()
> and it works. Can anyone explain why paths is not able to be set? And if I
> am using io.snapopen() wrong or is this a bug in Textadept?
>

I also wonder if io.get_project_root(path) is working like it is
documented. It seems to return 'nil' if the path passed to it is 'nil' and
the selected buffer is not under version control. I expected it to return
the buffers.filename path or the current working directory. Did I
misunderstand?

--
Regards,
Ryan
-- 
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 05 May 2014 - 14:23:32 EDT

This archive was generated by hypermail 2.2.0 : Tue 06 May 2014 - 06:25:32 EDT