Hi Bram,

On Sat, Apr 13, 2019 at 5:53 AM Bram Moolenaar
<[email protected]> wrote:
>
> > Something I don't like in the Neovim implementation: creating a new
> > tabpage (`:tabnew`, `:tabedit`) "inherits" the tab-local dir of the
> > current tabpage. Example:
> >
> > ```
> > :tcd /
> > :tabnew
> > :echo getcwd() " => /
> > ```
> >
> > This is annoying. We did it this way to mimic window-local
> > directories, but I don't think it's necessary. If someone wants
> > "sticky" behavior they can use `:lcd`. Tab-local directories are more
> > useful as an "alternative global CWD" for _only_ a particular tab.
> >
> > What is the behavior of this PR is that respect?
>
> When opening a new tabpage, it would make sense to have it start in the
> global directory. On the other hand, when doing:
> :tabedit somefile
> You don't really expect to jump to another directory. I know some
> people like to jump to the directory that file is in, setting
> 'autochdir' does that. But otherwise it seems wrong to jump to another
> directory than what is currently the effective directory.
>
> And then it's probably best to have :tabedit do the same no matter what
> arguments are given.
>
> In the new tab we have a choice to only set the local directory of the
> new window, or set the directory of the tab. Perhaps it works best if
> we make the tab use the global directory, and set the window-local
> directory if it was set in the previous window? It's probably also
> needed for backwards compatibility. So long as you split a window in
> the tab, the tab-local directory won't matter anyway.
>

The behavior of the current implementation is for the new tabpage
to inherit the tab-local directory of the previous tabpage. The new
window in the new tabpage inherits the directory of the previous
window.

Regards,
Yegappan

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui