0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.1218: cannot set a directory for a tab page

Problem:    Cannot set a directory for a tab page.
Solution:   Add the tab-local directory. (Yegappan Lakshmanan, closes #4212)
This commit is contained in:
Bram Moolenaar
2019-04-27 20:37:57 +02:00
parent 2155a6abaa
commit 00aa069db8
20 changed files with 441 additions and 66 deletions

View File

@@ -8704,11 +8704,13 @@ find_win_by_nr_or_id(typval_T *vp)
/*
* Find window specified by "wvp" in tabpage "tvp".
* Returns the tab page in 'ptp'
*/
win_T *
find_tabwin(
typval_T *wvp, /* VAR_UNKNOWN for current window */
typval_T *tvp) /* VAR_UNKNOWN for current tab page */
typval_T *wvp, // VAR_UNKNOWN for current window
typval_T *tvp, // VAR_UNKNOWN for current tab page
tabpage_T **ptp)
{
win_T *wp = NULL;
tabpage_T *tp = NULL;
@@ -8726,10 +8728,22 @@ find_tabwin(
tp = curtab;
if (tp != NULL)
{
wp = find_win_by_nr(wvp, tp);
if (wp == NULL && wvp->v_type == VAR_NUMBER
&& wvp->vval.v_number != -1)
// A window with the specified number is not found
tp = NULL;
}
}
else
{
wp = curwin;
tp = curtab;
}
if (ptp != NULL)
*ptp = tp;
return wp;
}