multigrid: Allow UIs to set grid size different from window size

This commit is contained in:
Utkarsh Maheshwari
2018-06-06 02:59:11 +05:30
committed by Björn Linse
parent f102f50ebe
commit 01555de2da
17 changed files with 270 additions and 195 deletions

View File

@@ -2120,8 +2120,8 @@ static int vgetorpeek(int advance)
++col;
}
curwin->w_wrow = curwin->w_cline_row
+ curwin->w_wcol / curwin->w_width;
curwin->w_wcol %= curwin->w_width;
+ curwin->w_wcol / curwin->w_grid.Columns;
curwin->w_wcol %= curwin->w_grid.Columns;
curwin->w_wcol += curwin_col_off();
col = 0; /* no correction needed */
} else {
@@ -2130,7 +2130,7 @@ static int vgetorpeek(int advance)
}
} else if (curwin->w_p_wrap && curwin->w_wrow) {
--curwin->w_wrow;
curwin->w_wcol = curwin->w_width - 1;
curwin->w_wcol = curwin->w_grid.Columns - 1;
col = curwin->w_cursor.col - 1;
}
if (col > 0 && curwin->w_wcol > 0) {