aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-05 23:02:01 +0800
committerGitHub <noreply@github.com>2022-09-05 23:02:01 +0800
commitfb39bba5a6d279101ca6925aa7b4ebf13f8238e4 (patch)
tree30ff58ac402c6a636731bf181b78eef1ec6aea91 /src/nvim/ex_docmd.c
parenta220650fd6ef6490a787eb7efcab24b4bf13dab8 (diff)
parentf6a8d395a72da61c9305cd242f38bd8137c4f5b0 (diff)
downloadrneovim-fb39bba5a6d279101ca6925aa7b4ebf13f8238e4.tar.gz
rneovim-fb39bba5a6d279101ca6925aa7b4ebf13f8238e4.tar.bz2
rneovim-fb39bba5a6d279101ca6925aa7b4ebf13f8238e4.zip
Merge pull request #20088 from zeertzjq/vim-9.0.0386
vim-patch:9.0.0386: some code blocks are nested too deep N/A patches for version.c: vim-patch:9.0.0385: GUI: when CTRL-D is mapped in Insert mode it gets inserted
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 6517ebd081..8fb166d2c9 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -5544,27 +5544,26 @@ void ex_cd(exarg_T *eap)
// for non-UNIX ":cd" means: print current directory unless 'cdhome' is set
if (*new_dir == NUL && !p_cdh) {
ex_pwd(NULL);
- } else
+ return;
+ }
#endif
- {
- CdScope scope = kCdScopeGlobal;
- switch (eap->cmdidx) {
- case CMD_tcd:
- case CMD_tchdir:
- scope = kCdScopeTabpage;
- break;
- case CMD_lcd:
- case CMD_lchdir:
- scope = kCdScopeWindow;
- break;
- default:
- break;
- }
- if (changedir_func(new_dir, scope)) {
- // Echo the new current directory if the command was typed.
- if (KeyTyped || p_verbose >= 5) {
- ex_pwd(eap);
- }
+ CdScope scope = kCdScopeGlobal;
+ switch (eap->cmdidx) {
+ case CMD_tcd:
+ case CMD_tchdir:
+ scope = kCdScopeTabpage;
+ break;
+ case CMD_lcd:
+ case CMD_lchdir:
+ scope = kCdScopeWindow;
+ break;
+ default:
+ break;
+ }
+ if (changedir_func(new_dir, scope)) {
+ // Echo the new current directory if the command was typed.
+ if (KeyTyped || p_verbose >= 5) {
+ ex_pwd(eap);
}
}
}