[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] tab completion in the browser

From: Benno Schulenberg
Subject: Re: [Nano-devel] tab completion in the browser
Date: Thu, 28 Apr 2016 13:49:02 +0200

On Wed, Apr 27, 2016, at 18:51, Rishabh Dave wrote:
> while reading source code where_we_are is *less* alluding to
> the fact that we are storing path in there.

True...  Changed in attached patch.

> Patch attached concatenates dirname to where_we_are to be relative to
> current path in browser (and not to path where nano was invoked). Thus
> tabbing would be successful.

Okay.  Tabbing is successful, but... giving an absolute and a relative
path doesn't work in the same way.  Run 'src/nano', then type:

^R ^T M-G /h <Tab>

It completes to /home/.  Now type:

<Enter> M-G ../h <Tab>

It completes to ../home -- that is: without the final slash.
This prevents giving a second tab to see what is inside home/.

It goes wrong in is_dir(mzero) later, because it tests ../home
against the actual current working directory instead of against

It seems that present_path needs to be concatenated with buf
before cwd_tab_completion() is called.


-- - Accessible with your email software
                          or over the web

Attachment: tab-also-relative.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]