1
0
forked from aniani/vim

patch 8.0.1489: there is no easy way to get the global directory

Problem:    There is no easy way to get the global directory, esp. if some
            windows have a local directory.
Solution:   Make getcwd(-1) return the global directory. (Andy Massimino,
            closes #2606)
This commit is contained in:
Bram Moolenaar
2018-02-09 20:53:59 +01:00
parent 0d20737732
commit 5459129af2
4 changed files with 26 additions and 7 deletions

View File

@@ -4484,10 +4484,13 @@ getcwd([{winnr} [, {tabnr}]])
Without arguments, for the current window.
With {winnr} return the local current directory of this window
in the current tab page.
in the current tab page. {winnr} can be the window number or
the |window-ID|.
If {winnr} is -1 return the name of the global working
directory. See also |haslocaldir()|.
With {winnr} and {tabnr} return the local current directory of
the window in the specified tab page.
{winnr} can be the window number or the |window-ID|.
Return an empty string if the arguments are invalid.
getfsize({fname}) *getfsize()*