Skip to content

Commit 273e246

Browse files
committed
Fix build error on tiny
1 parent a5d6299 commit 273e246

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

src/vim.h

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -919,15 +919,13 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring);
919919
#define FINDFILE_DIR 1 // only directories
920920
#define FINDFILE_BOTH 2 // files and directories
921921

922-
//#if defined(FEAT_TABPANEL)
923-
//# define COLUMNS_WITHOUT_TPL() (Columns - tabpanel_width())
924-
//# define TPL_LCOL(W) tabpanel_leftcol(W)
925-
//#else
926-
//# define COLUMNS_WITHOUT_TPL() Columns
927-
//# define TPL_LCOL(W) 0
928-
//#endif
929-
//# define NOUSE_COLUMNS_WITHOUT_TPL() Columns
930-
//# define NOUSE_TPL_LCOL(W) 0
922+
#if defined(FEAT_TABPANEL)
923+
# define COLUMNS_WITHOUT_TPL() (Columns - tabpanel_width())
924+
# define TPL_LCOL(W) tabpanel_leftcol(W)
925+
#else
926+
# define COLUMNS_WITHOUT_TPL() Columns
927+
# define TPL_LCOL(W) 0
928+
#endif
931929

932930
#define W_ENDCOL(wp) ((wp)->w_wincol + (wp)->w_width)
933931
#ifdef FEAT_MENU

src/window.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4566,7 +4566,7 @@ win_alloc_firstwin(win_T *oldwin)
45664566
if (curwin->w_frame == NULL)
45674567
return FAIL;
45684568
topframe = curwin->w_frame;
4569-
topframe->fr_width = Columns - tabpanel_width();
4569+
topframe->fr_width = COLUMNS_WITHOUT_TPL();
45704570
topframe->fr_height = Rows - p_ch;
45714571

45724572
return OK;
@@ -5805,8 +5805,8 @@ win_alloc(win_T *after, int hidden)
58055805
*/
58065806
if (!hidden)
58075807
win_append(after, new_wp);
5808-
new_wp->w_wincol = tabpanel_leftcol(NULL);
5809-
new_wp->w_width = Columns - tabpanel_width();
5808+
new_wp->w_wincol = TPL_LCOL(W);
5809+
new_wp->w_width = COLUMNS_WITHOUT_TPL();
58105810

58115811
// position the display and the cursor at the top of the file.
58125812
new_wp->w_topline = 1;
@@ -6197,7 +6197,7 @@ shell_new_columns(void)
61976197
if (firstwin == NULL) // not initialized yet
61986198
return;
61996199

6200-
int w = Columns - tabpanel_width();
6200+
int w = COLUMNS_WITHOUT_TPL();
62016201

62026202
// First try setting the widths of windows with 'winfixwidth'. If that
62036203
// doesn't result in the right width, forget about that option.
@@ -6283,7 +6283,7 @@ win_size_restore(garray_T *gap)
62836283
win_comp_pos(void)
62846284
{
62856285
int row = tabline_height();
6286-
int col = tabpanel_leftcol(NULL);
6286+
int col = TPL_LCOL(NULL);
62876287

62886288
frame_comp_pos(topframe, &row, &col);
62896289
return row;

0 commit comments

Comments
 (0)