diff options
author | James McCoy <jamessan@jamessan.com> | 2016-06-01 01:01:51 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-06-01 06:48:41 -0400 |
commit | f735ee90c263c5a0433fbd49a8589b71fa3e07ae (patch) | |
tree | a652921fb475381b7601ce088afdd7a4975ad1c7 /src | |
parent | a3f11ad27af930b52f429f6f04f7c5c232553720 (diff) | |
download | rneovim-f735ee90c263c5a0433fbd49a8589b71fa3e07ae.tar.gz rneovim-f735ee90c263c5a0433fbd49a8589b71fa3e07ae.tar.bz2 rneovim-f735ee90c263c5a0433fbd49a8589b71fa3e07ae.zip |
tcd: Use user-provided tab page for `getcwd()`/`haslocaldir()`
The initial implementation for `:tcd` always used `curtab` to find the
specified window. This would result in either inaccurate information or
an unexpected error (e.g., when there are more windows in the
user-specified tab page vs. the current tab page).
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 92e572db2f..ad77c5489e 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -9954,7 +9954,7 @@ static void f_getcwd(typval_T *argvars, typval_T *rettv) } if (scope_number[kCdScopeWindow] > 0) { - win = find_win_by_nr(&argvars[0], curtab); + win = find_win_by_nr(&argvars[0], tp); if (!win) { EMSG(_("E5002: Cannot find window number.")); return; @@ -10897,7 +10897,7 @@ static void f_haslocaldir(typval_T *argvars, typval_T *rettv) } if (scope_number[kCdScopeWindow] > 0) { - win = find_win_by_nr(&argvars[0], curtab); + win = find_win_by_nr(&argvars[0], tp); if (!win) { EMSG(_("E5002: Cannot find window number.")); return; |