comparison src/window.c @ 17670:1be29c149103 v8.1.1832

patch 8.1.1832: win_execute() does not work in other tab commit https://github.com/vim/vim/commit/820680b9ff1de8699156c7b060f97e5c0b87ad15 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 9 14:56:22 2019 +0200 patch 8.1.1832: win_execute() does not work in other tab Problem: Win_execute() does not work in other tab. (Rick Howe) Solution: Take care of the tab. (closes https://github.com/vim/vim/issues/4792)
author Bram Moolenaar <Bram@vim.org>
date Fri, 09 Aug 2019 15:00:05 +0200
parents 711db62c8aca
children 0f7ae8010787
comparison
equal deleted inserted replaced
17669:89ab05784a7e 17670:1be29c149103
6885 } 6885 }
6886 list_append_number(list, 0); 6886 list_append_number(list, 0);
6887 list_append_number(list, 0); 6887 list_append_number(list, 0);
6888 } 6888 }
6889 6889
6890 /*
6891 * Return the window pointer of window "id".
6892 */
6890 win_T * 6893 win_T *
6891 win_id2wp(int id) 6894 win_id2wp(int id)
6892 { 6895 {
6896 return win_id2wp_tp(id, NULL);
6897 }
6898
6899 /*
6900 * Return the window and tab pointer of window "id".
6901 */
6902 win_T *
6903 win_id2wp_tp(int id, tabpage_T **tpp)
6904 {
6893 win_T *wp; 6905 win_T *wp;
6894 tabpage_T *tp; 6906 tabpage_T *tp;
6895 6907
6896 FOR_ALL_TAB_WINDOWS(tp, wp) 6908 FOR_ALL_TAB_WINDOWS(tp, wp)
6897 if (wp->w_id == id) 6909 if (wp->w_id == id)
6910 {
6911 if (tpp != NULL)
6912 *tpp = tp;
6898 return wp; 6913 return wp;
6914 }
6899 #ifdef FEAT_TEXT_PROP 6915 #ifdef FEAT_TEXT_PROP
6900 // popup windows are in separate lists 6916 // popup windows are in separate lists
6901 FOR_ALL_TABPAGES(tp) 6917 FOR_ALL_TABPAGES(tp)
6902 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next) 6918 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
6903 if (wp->w_id == id) 6919 if (wp->w_id == id)
6920 {
6921 if (tpp != NULL)
6922 *tpp = tp;
6904 return wp; 6923 return wp;
6924 }
6905 for (wp = first_popupwin; wp != NULL; wp = wp->w_next) 6925 for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
6906 if (wp->w_id == id) 6926 if (wp->w_id == id)
6927 {
6928 if (tpp != NULL)
6929 *tpp = tp;
6907 return wp; 6930 return wp;
6931 }
6908 #endif 6932 #endif
6909 6933
6910 return NULL; 6934 return NULL;
6911 } 6935 }
6912 6936