From 8727d38012f3c4c54380d554e2a8c53e8c50ad0d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 17 Oct 2021 22:04:53 +0800 Subject: vim-patch:8.1.1291: not easy to change directory and restore Problem: Not easy to change directory and restore. Solution: Add the chdir() function. (Yegappan Lakshmanan, closes vim/vim#4358) https://github.com/vim/vim/commit/1063f3d2008f22d02ccfa9dab83a23db52febbdc Also includes some documentation changes from patch 8.1.1218. --- runtime/doc/vim_diff.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index c85cae4004..7e7bb7d62f 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -197,6 +197,10 @@ Functions: |stdpath()| |system()|, |systemlist()| can run {cmd} directly (without 'shell') |matchadd()| can be called before highlight group is defined + |getcwd()| and |haslocaldir()| may throw errors. *E5000* *E5001* *E5002* + |haslocaldir()|'s only possible return values are 0 and 1, it never returns 2. + `getcwd(-1)` is equivalent to `getcwd(-1, 0)` instead of returning the global + working directory. Use `getcwd(-1, -1)` to get the global working directory. Highlight groups: |highlight-blend| controls blend level for a highlight group -- cgit