patch 8.2.3780: ":cd" works differently on MS-Windows

Problem:    ":cd" works differently on MS-Windows.
Solution:   Add the 'cdhome' option. (closes #9324)
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index cea0e44..3493510 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1298,11 +1298,12 @@
 present in 'cpoptions' and "!" is not used in the command.
 
 							*: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.
-			On Unix systems: clear any window-local directory.
+: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 f1e2ac4..aa5a36a 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -635,6 +635,7 @@
 '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 1b826c7..38bc87e 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -260,6 +260,10 @@
 call <SID>AddOption("path", gettext("list of directory names used for file searching"))
 call append("$", "\t" .. s:global_or_local)
 call <SID>OptionG("pa", &pa)
+if exists("+cdhome")
+  call <SID>AddOption("cdhome", gettext("change directory to the home directory by :cd"))
+  call <SID>BinOptionG("cdh", &cdh)
+endif
 call <SID>AddOption("cdpath", gettext("list of directory names used for :cd"))
 call <SID>OptionG("cd", &cd)
 if exists("+autochdir")