diff options
| author | Mike <4576770+mike325@users.noreply.github.com> | 2025-03-14 09:36:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-14 01:36:39 -0700 |
| commit | 6401b433f7c040663b1ae01204e1b07b567d6a1b (patch) | |
| tree | 40200171414f965555082bbdb63f00e393f87b26 /runtime/doc | |
| parent | 2db1ae37f14d71d1391110fe18709329263c77c9 (diff) | |
| download | rneovim-6401b433f7c040663b1ae01204e1b07b567d6a1b.tar.gz rneovim-6401b433f7c040663b1ae01204e1b07b567d6a1b.tar.bz2 rneovim-6401b433f7c040663b1ae01204e1b07b567d6a1b.zip | |
fix(vim.fs): default to follow=false #32859
Problem:
Following symlinks can have surprising behavior and slow performance.
Solution:
Do not set it by default.
Diffstat (limited to 'runtime/doc')
| -rw-r--r-- | runtime/doc/lua.txt | 4 | ||||
| -rw-r--r-- | runtime/doc/news.txt | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index fa3367602d..6705768aeb 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2985,7 +2985,7 @@ vim.fs.dir({path}, {opts}) *vim.fs.dir()* • skip: (fun(dir_name: string): boolean)|nil Predicate to control traversal. Return false to stop searching the current directory. Only useful when depth > 1 - • follow: boolean|nil Follow symbolic links. (default: true) + • follow: boolean|nil Follow symbolic links. (default: false) Return: ~ (`Iterator`) over items in {path}. Each iteration yields two values: @@ -3058,7 +3058,7 @@ vim.fs.find({names}, {opts}) *vim.fs.find()* • {limit}? (`number`, default: `1`) Stop the search after finding this many matches. Use `math.huge` to place no limit on the number of matches. - • {follow}? (`boolean`, default: `true`) Follow symbolic + • {follow}? (`boolean`, default: `false`) Follow symbolic links. Return: ~ diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index cfb40f1ca6..54a67ebb59 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -330,8 +330,8 @@ LUA • |vim.json.encode()| has an option to enable forward slash escaping • |vim.fs.abspath()| converts paths to absolute paths. • |vim.fs.relpath()| gets relative path compared to base path. -• |vim.fs.dir()| and |vim.fs.find()| now follow symbolic links by default, - the behavior can be turn off using the new `follow` option. +• |vim.fs.dir()| and |vim.fs.find()| can now follow symbolic links, + the behavior can be turn on using the new `follow` option. • |vim.text.indent()| indents/dedents text. OPTIONS |