From 3d504f27a002b3ce6acf75398789a37611b35c44 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 19 Nov 2021 20:07:04 +0800 Subject: vim-patch:8.2.3618: getcwd() is unclear about how 'autochdir' is used Problem: getcwd() is unclear about how 'autochdir' is used. Solution: Update the help for getcwd(). Without any arguments always return the actual current directory. (closes vim/vim#9142) https://github.com/vim/vim/commit/851c7a699ae00bdc14a4db874cf722b7b7393b53 --- runtime/doc/eval.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index eb3dbd9b70..da39a56164 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -5001,11 +5001,11 @@ getcurpos() Get the position of the cursor. This is like getpos('.'), but getcwd([{winnr}[, {tabnr}]]) *getcwd()* With no arguments, returns the name of the effective |current-directory|. With {winnr} or {tabnr} the working - directory of that scope is returned. + directory of that scope is returned, and 'autochdir' is + ignored. Tabs and windows are identified by their respective numbers, - 0 means current tab or window. Missing argument implies 0. + 0 means current tab or window. Missing tab number implies 0. Thus the following are equivalent: > - getcwd() getcwd(0) getcwd(0, 0) < If {winnr} is -1 it is ignored, only the tab is resolved. -- cgit