mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
refactor(screen): simplify grid_clear() and win_draw_end()
grid_put_linebuf() used grid_clear() internally to handle clearing the left part of a rightleft line. By reimplementing that internally, we can instead use grid_put_linebuf() as the implementation of grid_clear(), which in the end is a net reduction of code as grid_fill() is used for nothing else. win_draw_end: Implement "draw_margin" on a per-row basis which closer reflects how terminals work. Also use the magic mirror for 'rightleft'
This commit is contained in:
@@ -448,13 +448,12 @@ void ui_set_ext_option(UI *ui, UIExtension ext, bool active)
|
||||
}
|
||||
}
|
||||
|
||||
void ui_line(ScreenGrid *grid, int row, int startcol, int endcol, int clearcol, int clearattr,
|
||||
bool wrap)
|
||||
void ui_line(ScreenGrid *grid, int row, bool invalid_row, int startcol, int endcol, int clearcol,
|
||||
int clearattr, bool wrap)
|
||||
{
|
||||
assert(0 <= row && row < grid->rows);
|
||||
LineFlags flags = wrap ? kLineFlagWrap : 0;
|
||||
if (startcol == -1) {
|
||||
startcol = 0;
|
||||
if (startcol == 0 && invalid_row) {
|
||||
flags |= kLineFlagInvalid;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user