comparison runtime/doc/eval.txt @ 26173:460790b520dd v8.2.3618

patch 8.2.3618: getcwd() is unclear about how 'autochdir' is used Commit: https://github.com/vim/vim/commit/851c7a699ae00bdc14a4db874cf722b7b7393b53 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 18 20:47:31 2021 +0000 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 #9142)
author Bram Moolenaar <Bram@vim.org>
date Thu, 18 Nov 2021 22:00:06 +0100
parents 624439a39432
children 72c394673e00
comparison
equal deleted inserted replaced
26172:b35f5fdc951b 26173:460790b520dd
5755 GetWinid()->getcursorcharpos() 5755 GetWinid()->getcursorcharpos()
5756 5756
5757 < *getcwd()* 5757 < *getcwd()*
5758 getcwd([{winnr} [, {tabnr}]]) 5758 getcwd([{winnr} [, {tabnr}]])
5759 The result is a String, which is the name of the current 5759 The result is a String, which is the name of the current
5760 working directory. 5760 working directory. 'autochdir' is ignored.
5761 5761
5762 With {winnr} return the local current directory of this window 5762 With {winnr} return the local current directory of this window
5763 in the current tab page. {winnr} can be the window number or 5763 in the current tab page. {winnr} can be the window number or
5764 the |window-ID|. 5764 the |window-ID|.
5765 If {winnr} is -1 return the name of the global working 5765 If {winnr} is -1 return the name of the global working
5768 With {winnr} and {tabnr} return the local current directory of 5768 With {winnr} and {tabnr} return the local current directory of
5769 the window in the specified tab page. If {winnr} is -1 return 5769 the window in the specified tab page. If {winnr} is -1 return
5770 the working directory of the tabpage. 5770 the working directory of the tabpage.
5771 If {winnr} is zero use the current window, if {tabnr} is zero 5771 If {winnr} is zero use the current window, if {tabnr} is zero
5772 use the current tabpage. 5772 use the current tabpage.
5773 Without any arguments, return the working directory of the 5773 Without any arguments, return the actual working directory of
5774 current window. 5774 the current window.
5775 Return an empty string if the arguments are invalid. 5775 Return an empty string if the arguments are invalid.
5776 5776
5777 Examples: > 5777 Examples: >
5778 " Get the working directory of the current window 5778 " Get the working directory of the current window
5779 :echo getcwd() 5779 :echo getcwd()