tcd: Determine correct scope from user input

If a user specifies both {window} and {tab}, `getcwd()`/`haslocaldir()`
are using "tab" as the scope that should be reported.  However, it
should be using "window" as the scope, within the specified tab page.
This commit is contained in:
James McCoy
2016-06-01 01:09:13 -04:00
parent f735ee90c2
commit 4e9f7684f6
3 changed files with 38 additions and 30 deletions

View File

@@ -6865,6 +6865,9 @@ void post_chdir(CdScope scope)
curwin->w_localdir = vim_strsave(NameBuff);
}
break;
case kCdScopeInvalid:
// We should never get here
assert(false);
}
shorten_fnames(TRUE);