diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-02-11 19:59:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-11 19:59:37 +0100 |
| commit | f389196a344591da2f6cc2a63f4953e34316f954 (patch) | |
| tree | 8cce092c29f33ae109dcf61e12e822d84aa014c7 /src/nvim/popupmnu.c | |
| parent | 2cfc1b055bba6bb0f7e263a69079c7f52303a78a (diff) | |
| parent | f26a4d484b486019c90fc55af5e74e33de374bc4 (diff) | |
| download | rneovim-f389196a344591da2f6cc2a63f4953e34316f954.tar.gz rneovim-f389196a344591da2f6cc2a63f4953e34316f954.tar.bz2 rneovim-f389196a344591da2f6cc2a63f4953e34316f954.zip | |
Merge #7960 'vim patches'
Diffstat (limited to 'src/nvim/popupmnu.c')
| -rw-r--r-- | src/nvim/popupmnu.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/popupmnu.c b/src/nvim/popupmnu.c index bf79e4b84f..348daf028a 100644 --- a/src/nvim/popupmnu.c +++ b/src/nvim/popupmnu.c @@ -567,6 +567,7 @@ static int pum_set_selected(int n, int repeat) && (repeat <= 1) && (vim_strchr(p_cot, 'p') != NULL)) { win_T *curwin_save = curwin; + tabpage_T *curtab_save = curtab; int res = OK; // Open a preview window. 3 lines by default. Prefer @@ -647,7 +648,12 @@ static int pum_set_selected(int n, int repeat) curwin->w_cursor.lnum = 1; curwin->w_cursor.col = 0; - if ((curwin != curwin_save) && win_valid(curwin_save)) { + if ((curwin != curwin_save && win_valid(curwin_save)) + || (curtab != curtab_save && valid_tabpage(curtab_save))) { + if (curtab != curtab_save && valid_tabpage(curtab_save)) { + goto_tabpage_tp(curtab_save, false, false); + } + // When the first completion is done and the preview // window is not resized, skip the preview window's // status line redrawing. |
