Mercurial > vim
comparison src/eval.c @ 16427:8c3a1bd270bb v8.1.1218
patch 8.1.1218: cannot set a directory for a tab page
commit https://github.com/vim/vim/commit/00aa069db8132851a91cfc5ca7f58ef945c75c73
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 27 20:37:57 2019 +0200
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 https://github.com/vim/vim/issues/4212)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 27 Apr 2019 20:45:05 +0200 |
parents | 5b5c5daf57de |
children | 6e87a69b8e0c |
comparison
equal
deleted
inserted
replaced
16426:21cad471f04a | 16427:8c3a1bd270bb |
---|---|
8702 return find_win_by_nr(vp, NULL); | 8702 return find_win_by_nr(vp, NULL); |
8703 } | 8703 } |
8704 | 8704 |
8705 /* | 8705 /* |
8706 * Find window specified by "wvp" in tabpage "tvp". | 8706 * Find window specified by "wvp" in tabpage "tvp". |
8707 * Returns the tab page in 'ptp' | |
8707 */ | 8708 */ |
8708 win_T * | 8709 win_T * |
8709 find_tabwin( | 8710 find_tabwin( |
8710 typval_T *wvp, /* VAR_UNKNOWN for current window */ | 8711 typval_T *wvp, // VAR_UNKNOWN for current window |
8711 typval_T *tvp) /* VAR_UNKNOWN for current tab page */ | 8712 typval_T *tvp, // VAR_UNKNOWN for current tab page |
8713 tabpage_T **ptp) | |
8712 { | 8714 { |
8713 win_T *wp = NULL; | 8715 win_T *wp = NULL; |
8714 tabpage_T *tp = NULL; | 8716 tabpage_T *tp = NULL; |
8715 long n; | 8717 long n; |
8716 | 8718 |
8724 } | 8726 } |
8725 else | 8727 else |
8726 tp = curtab; | 8728 tp = curtab; |
8727 | 8729 |
8728 if (tp != NULL) | 8730 if (tp != NULL) |
8731 { | |
8729 wp = find_win_by_nr(wvp, tp); | 8732 wp = find_win_by_nr(wvp, tp); |
8733 if (wp == NULL && wvp->v_type == VAR_NUMBER | |
8734 && wvp->vval.v_number != -1) | |
8735 // A window with the specified number is not found | |
8736 tp = NULL; | |
8737 } | |
8730 } | 8738 } |
8731 else | 8739 else |
8740 { | |
8732 wp = curwin; | 8741 wp = curwin; |
8742 tp = curtab; | |
8743 } | |
8744 | |
8745 if (ptp != NULL) | |
8746 *ptp = tp; | |
8733 | 8747 |
8734 return wp; | 8748 return wp; |
8735 } | 8749 } |
8736 | 8750 |
8737 /* | 8751 /* |