diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-10-17 22:04:53 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2021-10-17 22:04:53 +0800 |
commit | 6004f9137a5625025cfa76700239d9abcac85f47 (patch) | |
tree | c478439f3ea24fda8cb315b8c8415daf0a3422a3 /src/nvim/ex_docmd.c | |
parent | 36290a2ebd3d49fa43f90fbdbf32e0cbe4f76d87 (diff) | |
download | rneovim-6004f9137a5625025cfa76700239d9abcac85f47.tar.gz rneovim-6004f9137a5625025cfa76700239d9abcac85f47.tar.bz2 rneovim-6004f9137a5625025cfa76700239d9abcac85f47.zip |
refactor(dirchanged): tab -> tabpage
Match Vim's behavior.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 26c06b2675..c52d1576d6 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -7711,7 +7711,7 @@ void free_cd_dir(void) static char_u *get_prevdir(CdScope scope) { switch (scope) { - case kCdScopeTab: + case kCdScopeTabpage: return curtab->tp_prevdir; break; case kCdScopeWindow: @@ -7731,7 +7731,7 @@ void post_chdir(CdScope scope, bool trigger_dirchanged) XFREE_CLEAR(curwin->w_localdir); // Overwrite the tab-local CWD for :cd, :tcd. - if (scope >= kCdScopeTab) { + if (scope >= kCdScopeTabpage) { XFREE_CLEAR(curtab->tp_localdir); } @@ -7752,7 +7752,7 @@ void post_chdir(CdScope scope, bool trigger_dirchanged) // We are now in the global directory, no need to remember its name. XFREE_CLEAR(globaldir); break; - case kCdScopeTab: + case kCdScopeTabpage: curtab->tp_localdir = (char_u *)xstrdup(cwd); break; case kCdScopeWindow: @@ -7803,7 +7803,7 @@ bool changedir_func(char_u *new_dir, CdScope scope) } switch (scope) { - case kCdScopeTab: + case kCdScopeTabpage: curtab->tp_prevdir = pdir; break; case kCdScopeWindow: @@ -7850,7 +7850,7 @@ void ex_cd(exarg_T *eap) switch (eap->cmdidx) { case CMD_tcd: case CMD_tchdir: - scope = kCdScopeTab; + scope = kCdScopeTabpage; break; case CMD_lcd: case CMD_lchdir: |