#endif
(void)win_split_ins(0, WSP_TOP | WSP_FORCE_ROOM, auc_win, 0, NULL);
- (void)win_comp_pos(); // recompute window positions
+ win_comp_pos(); // recompute window positions
p_ea = save_ea;
#ifdef FEAT_AUTOCHDIR
p_acd = save_acd;
close_tabpage(curtab);
restore_snapshot(SNAP_AUCMD_IDX, FALSE);
- (void)win_comp_pos(); // recompute window positions
+ win_comp_pos(); // recompute window positions
unblock_autocmds();
save_curwin = win_find_by_id(aco->save_curwin_id);
/* tabpanel.c */
int tabpanel_width(void);
-int tabpanel_leftcol(win_T *wp);
+int tabpanel_leftcol(void);
int tabpanelopt_changed(void);
void draw_tabpanel(void);
int get_tabpagenr_on_tabpanel(void);
void shell_new_columns(void);
void win_size_save(garray_T *gap);
void win_size_restore(garray_T *gap);
-int win_comp_pos(void);
+void win_comp_pos(void);
void win_ensure_size(void);
void win_setheight(int height);
void win_setheight_win(int height, win_T *win);
* Return the offset of a window considering the width of tabpanel.
*/
int
-tabpanel_leftcol(win_T *wp)
+tabpanel_leftcol(void)
{
- if (cmdline_pum_active() || (wp != NULL && WIN_IS_POPUP(wp)))
- return 0;
- else
- return tpl_align == ALIGN_RIGHT ? 0 : tabpanel_width();
+ return tpl_align == ALIGN_RIGHT ? 0 : tabpanel_width();
}
/*
--- /dev/null
+|[+8#0000001#e0e0e08|N|o| |N|a|m|e|]| @11|[|N|o| |N|a|m|e|]| | +2#0000000#ffffff0|a@2| | +1&&@7|X+8#0000001#e0e0e08
+|a+2#0000000#ffffff0@2| @16> +0&&@24
+| +1&&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +0#0000000&@44
--- /dev/null
+|[+8#0000001#e0e0e08|N|o| |N|a|m|e|]| @12|N|a|m|e|]| @1|a@2| | +2#0000000#ffffff0|b@2| | +1&&@5|X+8#0000001#e0e0e08
+|a@2| @16| +0#0000000#ffffff0@24
+|b+2&&@2| @16|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +0#0000001#e0e0e08|s|e|t| @11| +1#0000000#ffffff0@3|~+0#4040ff13&| @23
+| +0#0000001#ffd7ff255|s|e|t|f|i|l|e|t|y|p|e| @3| +1#0000000#ffffff0@3|~+0#4040ff13&| @23
+| +0#0000001#ffd7ff255|s|e|t|g|l|o|b|a|l| @5| +1#0000000#ffffff0@3|~+0#4040ff13&| @23
+| +0#0000001#ffd7ff255|s|e|t|l|o|c|a|l| @6| +1#0000000#ffffff0@3|~+0#4040ff13&| @23
+|:+0#0000000&|s|e|t> @40
call StopVimInTerminal(buf)
endfunc
+
+function Test_tabpanel_with_cmdline_pum()
+ CheckScreendump
+
+ let lines =<< trim END
+ set showtabpanel=2
+ set noruler
+ tabnew aaa
+ set wildoptions+=pum
+ func TimerCb(timer)
+ tabnew bbb
+ endfunc
+ call timer_start(100, 'TimerCb')
+ END
+ call writefile(lines, 'XTest_tabpanel_with_cmdline_pum', 'D')
+
+ let buf = RunVimInTerminal('-S XTest_tabpanel_with_cmdline_pum', {'rows': 10, 'cols': 45})
+ call term_sendkeys(buf, "\<C-L>")
+ call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_pum_0', {})
+ call term_sendkeys(buf, ":set\<Tab>")
+ call term_wait(buf, 120)
+ call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_pum_1', {})
+ call term_sendkeys(buf, "\<Esc>:tabclose\<CR>\<C-L>")
+ call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_pum_0', {})
+
+ call StopVimInTerminal(buf)
+endfunc
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1461,
/**/
1460,
/**/
#if defined(FEAT_TABPANEL)
# define COLUMNS_WITHOUT_TPL() (Columns - tabpanel_width())
-# define TPL_LCOL(W) tabpanel_leftcol(W)
+# define TPL_LCOL() tabpanel_leftcol()
#else
# define COLUMNS_WITHOUT_TPL() Columns
-# define TPL_LCOL(W) 0
+# define TPL_LCOL() 0
#endif
#define W_ENDCOL(wp) ((wp)->w_wincol + (wp)->w_width)
}
if (flags & (WSP_TOP | WSP_BOT))
- (void)win_comp_pos();
+ win_comp_pos();
// Both windows need redrawing. Update all status lines, in case they
// show something related to the window count or position.
frame_fix_width(curwin);
frame_fix_width(wp);
- (void)win_comp_pos(); // recompute window positions
+ win_comp_pos(); // recompute window positions
if (wp->w_buffer != curbuf)
reset_VIsual_and_resel();
frame_fix_width(wp2);
// recompute w_winrow and w_wincol for all windows
- (void)win_comp_pos();
+ win_comp_pos();
}
redraw_all_later(UPD_NOT_VALID);
winframe_remove(wp, &dir, NULL, &unflat_altfr);
win_remove(wp, NULL);
last_status(FALSE); // may need to remove last status line
- (void)win_comp_pos(); // recompute window positions
+ win_comp_pos(); // recompute window positions
// Split a window on the desired side and put "wp" there.
if (win_split_ins(size, flags, wp, dir, unflat_altfr) == FAIL)
win_append(win2, win1);
frame_append(win2->w_frame, win1->w_frame);
- (void)win_comp_pos(); // recompute w_winrow for all windows
+ win_comp_pos(); // recompute w_winrow for all windows
redraw_later(UPD_NOT_VALID);
}
win_enter(win1, FALSE);
*/
if (!hidden)
win_append(after, new_wp);
- new_wp->w_wincol = TPL_LCOL(NULL);
+ new_wp->w_wincol = TPL_LCOL();
new_wp->w_width = COLUMNS_WITHOUT_TPL();
// position the display and the cursor at the top of the file.
if (!frame_check_height(topframe, h))
frame_new_height(topframe, h, FALSE, FALSE, FALSE);
- (void)win_comp_pos(); // recompute w_winrow and w_wincol
+ win_comp_pos(); // recompute w_winrow and w_wincol
compute_cmdrow();
curtab->tp_ch_used = p_ch;
if (!frame_check_width(topframe, w))
frame_new_width(topframe, w, FALSE, FALSE);
- (void)win_comp_pos(); // recompute w_winrow and w_wincol
+ win_comp_pos(); // recompute w_winrow and w_wincol
if (!skip_win_fix_scroll)
win_fix_scroll(TRUE);
}
}
// recompute the window positions
- (void)win_comp_pos();
+ win_comp_pos();
}
}
* frames.
* Returns the row just after the last window.
*/
- int
+ void
win_comp_pos(void)
{
int row = tabline_height();
- int col = TPL_LCOL(NULL);
+ int col = TPL_LCOL();
frame_comp_pos(topframe, &row, &col);
- return row;
}
/*
frame_setwidth(wp->w_frame, width + wp->w_vsep_width);
// recompute the window positions
- (void)win_comp_pos();
+ win_comp_pos();
redraw_all_later(UPD_NOT_VALID);
}
else
fr = fr->fr_next;
}
- (void)win_comp_pos();
+ win_comp_pos();
redraw_all_later(UPD_NOT_VALID);
}
{
frame_new_height(fp, fp->fr_height - 1, FALSE, FALSE, FALSE);
frame_fix_height(wp);
- (void)win_comp_pos();
+ win_comp_pos();
}
else
win_new_height(wp, wp->w_height - 1);