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

updated for version 7.3.938

Problem:    Python: not easy to get to window number.
Solution:   Add vim.window.number. (ZyX)
This commit is contained in:
Bram Moolenaar
2013-05-12 19:00:41 +02:00
parent 971db46799
commit 6d21645f46
5 changed files with 30 additions and 8 deletions

View File

@@ -6731,3 +6731,20 @@ get_match(wp, id)
return cur;
}
#endif
#if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) || defined(PROTO)
int
get_win_number(win_T *wp)
{
int i = 1;
win_T *w;
for (w = firstwin; w != NULL && w != wp; w = W_NEXT(w))
++i;
if (w == NULL)
return 0;
else
return i;
}
#endif