Skip to content

Commit 181ca99

Browse files
committed
patch 8.0.1520: cursor in wrong line when using a WinBar in Terminal window
Problem: Cursor is in the wrong line when using a WinBar in a Terminal window. Solution: Adjust the row number. (Christian Brabandt, closes #2362)
1 parent 341a64c commit 181ca99

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/screen.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,6 +1176,11 @@ win_update(win_T *wp)
11761176
*/
11771177
if (term_update_window(wp) == OK)
11781178
{
1179+
# ifdef FEAT_MENU
1180+
/* Draw the window toolbar, if there is one. */
1181+
if (winbar_height(wp) > 0)
1182+
redraw_win_toolbar(wp);
1183+
# endif
11791184
wp->w_redr_type = 0;
11801185
return;
11811186
}

src/terminal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,8 +2398,8 @@ term_update_window(win_T *wp)
23982398
else
23992399
pos.col = 0;
24002400

2401-
screen_line(wp->w_winrow + pos.row, wp->w_wincol,
2402-
pos.col, wp->w_width, FALSE);
2401+
screen_line(wp->w_winrow + pos.row + winbar_height(wp),
2402+
wp->w_wincol, pos.col, wp->w_width, FALSE);
24032403
}
24042404
term->tl_dirty_row_start = MAX_ROW;
24052405
term->tl_dirty_row_end = 0;

src/version.c

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

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1520,
774776
/**/
775777
1519,
776778
/**/

0 commit comments

Comments
 (0)