From 42cf76fd0ab2afe3ca633d0d6600c8a771731f57 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 25 Dec 2021 11:31:54 +0800 Subject: vim-patch:8.2.3780: ":cd" works differently on MS-Windows Problem: ":cd" works differently on MS-Windows. Solution: Add the 'cdhome' option. (closes vim/vim#9324) https://github.com/vim/vim/commit/29f3a4591528130fded3fe1d63d74bcf22ab4f6c --- runtime/doc/editing.txt | 10 ++++++---- runtime/doc/quickref.txt | 1 + runtime/optwin.vim | 4 ++++ 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 4e3173cfa9..14df41e6c8 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1253,10 +1253,12 @@ working directory. If a local working directory (tab or window) does not exist, the next-higher scope in the hierarchy applies. *:cd* *E747* *E472* -:cd[!] On non-Unix systems: Print the current directory - name. On Unix systems: Change the current directory - to the home directory. Use |:pwd| to print the - current directory on all systems. +:cd[!] On non-Unix systems when 'cdhome' is off: Print the + current directory name. + Otherwise: Change the current directory to the home + directory. Clear any window-local directory. + Use |:pwd| to print the current directory on all + systems. :cd[!] {path} Change the current directory to {path}. If {path} is relative, it is searched for in the diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index a229c8742f..af8301f1a0 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -629,6 +629,7 @@ Short explanation of each option: *option-list* 'buflisted' 'bl' whether the buffer shows up in the buffer list 'buftype' 'bt' special type of buffer 'casemap' 'cmp' specifies how case of letters is changed +'cdhome' 'cdh' change directory to the home directory by ":cd" 'cdpath' 'cd' list of directories searched with ":cd" 'cedit' key used to open the command-line window 'charconvert' 'ccv' expression for character encoding conversion diff --git a/runtime/optwin.vim b/runtime/optwin.vim index d4c10f7afa..99420c524b 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -261,6 +261,10 @@ call OptionG("sect", §) call append("$", "path\tlist of directory names used for file searching") call append("$", "\t(global or local to buffer)") call OptionG("pa", &pa) +if exists("+cdhome") + call AddOption("cdhome", "change directory to the home directory by :cd") + call BinOptionG("cdh", &cdh) +endif call append("$", "cdpath\tlist of directory names used for :cd") call OptionG("cd", &cd) if exists("+autochdir") -- cgit From cf609ce655676b7c4fb7eecdafb4df1b1f60afb6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 25 Dec 2021 11:31:54 +0800 Subject: vim-patch:8.2.3784: the help for options is outdated Problem: The help for options is outdated. Solution: Include all the recent changes. https://github.com/vim/vim/commit/7b1463bca36d16e70afd6779e4fbb30761048c91 This is the only applicable hunk. --- runtime/doc/options.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index b75dd78b57..c929178f5a 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1159,6 +1159,14 @@ A jump table for the options with a short description can be found at |Q_op|. case mapping, the current locale is not effective. This probably only matters for Turkish. + *'cdhome'* *'cdh'* +'cdhome' 'cdh' boolean (default: off) + global + When on, |:cd|, |:tcd| and |:lcd| without an argument changes the + current working directory to the |$HOME| directory like in Unix. + When off, those commands just print the current directory name. + On Unix this option has no effect. + *'cdpath'* *'cd'* *E344* *E346* 'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,") global -- cgit From a5d3dd9359cd727f7c2e89b9b3951d55df4acf5d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 25 Dec 2021 11:31:54 +0800 Subject: vim-patch:partial:0e6adf8a29d5 Update runtime files https://github.com/vim/vim/commit/0e6adf8a29d5c2c96c42cc7157f71bf22c2ad471 --- runtime/optwin.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'runtime') diff --git a/runtime/optwin.vim b/runtime/optwin.vim index 99420c524b..c873252909 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: Bram Moolenaar -" Last Change: 2020 Oct 27 +" Last Change: 2021 Dec 12 " If there already is an option window, jump to that one. let buf = bufnr('option-window') @@ -261,10 +261,8 @@ call OptionG("sect", §) call append("$", "path\tlist of directory names used for file searching") call append("$", "\t(global or local to buffer)") call OptionG("pa", &pa) -if exists("+cdhome") - call AddOption("cdhome", "change directory to the home directory by :cd") - call BinOptionG("cdh", &cdh) -endif +call AddOption("cdhome", ":cd without argument goes to the home directory") +call BinOptionG("cdh", &cdh) call append("$", "cdpath\tlist of directory names used for :cd") call OptionG("cd", &cd) if exists("+autochdir") -- cgit