multigrid: Fix sending window grid handle in ext_newline mode

This commit is contained in:
Utkarsh Maheshwari
2018-09-04 02:45:29 +05:30
committed by Björn Linse
parent 16c3337122
commit 62be9f39ef
2 changed files with 11 additions and 11 deletions

View File

@@ -347,15 +347,17 @@ void ui_cursor_goto(int new_row, int new_col)
void ui_grid_cursor_goto(ScreenGrid *grid, int new_row, int new_col)
{
int off_row = (ui_is_external(kUIMultigrid) ? 0 : grid->OffsetRow);
int off_col = (ui_is_external(kUIMultigrid) ? 0 : grid->OffsetColumn);
new_row += ui_is_external(kUIMultigrid) ? 0 : grid->OffsetRow;
new_col += ui_is_external(kUIMultigrid) ? 0 : grid->OffsetColumn;
int handle = ui_is_external(kUIMultigrid) ? grid->handle : DEFAULT_GRID_HANDLE;
if (new_row + off_row == row && new_col + off_col == col) {
if (new_row == row && new_col == col && handle == cursor_grid_handle) {
return;
}
row = new_row + off_row;
col = new_col + off_col;
cursor_grid_handle = grid->handle;
row = new_row;
col = new_col;
cursor_grid_handle = handle;
pending_cursor_update = true;
}