From bb75610d998cdd9439ab84c2ac92ec2ac456c76d Mon Sep 17 00:00:00 2001 From: glepnir Date: Fri, 4 Jul 2025 13:44:39 +0800 Subject: vim-patch:9.1.1507: symlinks are resolved on :cd commands (#34758) Problem: File paths change from symlink to target path after :cd command when editing files through symbolic links Solution: Add "~" flag to 'cpoptions' to control symlink resolution. When not included (default), symlinks are resolved maintaining backward compatibility. When included, symlinks are preserved providing the improved behavior. (glepnir) related: neovim/neovim#15695 closes: vim/vim#17628 https://github.com/vim/vim/commit/4ade668fb62ebf3f8be537fe451caed6bd1eba9a --- runtime/lua/vim/_meta/options.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 2c6d3e6048..585a02f330 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1515,6 +1515,13 @@ vim.bo.ci = vim.bo.copyindent --- character, the cursor won't move. When not included, --- the cursor would skip over it and jump to the --- following occurrence. +--- *cpo-~* +--- ~ When included, don't resolve symbolic links when +--- changing directory with `:cd`, `:lcd`, or `:tcd`. +--- This preserves the symbolic link path in buffer names +--- and when displaying the current directory. When +--- excluded (default), symbolic links are resolved to +--- their target paths. --- *cpo-_* --- _ When using `cw` on a word, do not include the --- whitespace following the word in the motion. -- cgit