Skip to content

Commit 1ff3e70

Browse files
h-eastchrisbra
authored andcommitted
patch 9.1.1905: tabpanel: truncates terminal output
Problem: tabpanel: truncates terminal output (hokorobi) Solution: Use topframe->fr_width, not Columns (which includes the tabpanel width) (Hirohito Higashi) related: #18678 closes: #18707 Signed-off-by: Hirohito Higashi <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent b74ec15 commit 1ff3e70

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/terminal.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,11 @@ set_term_and_win_size(term_T *term, jobopt_T *opt)
291291
#ifdef FEAT_GUI
292292
if (term->tl_system)
293293
{
294-
// Use the whole screen for the system command. However, it will start
295-
// at the command line and scroll up as needed, using tl_toprow.
294+
// Use the entire screen (excluding the tabpanel area) for the system
295+
// commands. However, it will start at the command line and scroll up
296+
// as needed, using tl_toprow.
296297
term->tl_rows = Rows;
297-
term->tl_cols = Columns;
298+
term->tl_cols = topframe->fr_width;
298299
return;
299300
}
300301
#endif
@@ -1340,7 +1341,7 @@ update_cursor(term_T *term, int redraw)
13401341
#ifdef FEAT_GUI
13411342
if (term->tl_system)
13421343
windgoto(term->tl_cursor_pos.row + term->tl_toprow,
1343-
term->tl_cursor_pos.col);
1344+
firstwin->w_wincol + term->tl_cursor_pos.col);
13441345
else
13451346
#endif
13461347
if (!term_job_running(term))
@@ -3989,15 +3990,15 @@ update_system_term(term_T *term)
39893990
{
39903991
if (pos.row < term->tl_rows)
39913992
{
3992-
int max_col = MIN(Columns, term->tl_cols);
3993+
int max_col = MIN(topframe->fr_width, term->tl_cols);
39933994

39943995
term_line2screenline(term, NULL, screen, &pos, max_col);
39953996
}
39963997
else
39973998
pos.col = 0;
39983999

3999-
screen_line(curwin, term->tl_toprow + pos.row, 0, pos.col, Columns, -1,
4000-
0);
4000+
screen_line(curwin, term->tl_toprow + pos.row,
4001+
firstwin->w_wincol, pos.col, topframe->fr_width, -1, 0);
40014002
}
40024003

40034004
term->tl_dirty_row_start = MAX_ROW;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,8 @@ static char *(features[]) =
729729

730730
static int included_patches[] =
731731
{ /* Add new patch number below this line */
732+
/**/
733+
1905,
732734
/**/
733735
1904,
734736
/**/

0 commit comments

Comments
 (0)