mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
UI/TUI: improvements and cleanups for scrolling and clearing
- TUI: _never_ rely on BCE for implicit clearing, only explicit commands. - TUI: use unibi_erase_chars when possible. - TUI: use end-exclusive ranges for invalid and cleared areas - screen: scrolling leaves scrolled in aree undefined. This is a conservative change, a client assuming the old semantics will still behave correctly. - screen: factor out vsep handling from line drawing. This is needed anyway for the multigrid refactor. - screen: simplifications of win_do_lines
This commit is contained in:
@@ -22,15 +22,13 @@ struct ugrid {
|
||||
|
||||
// -V:UGRID_FOREACH_CELL:625
|
||||
|
||||
#define UGRID_FOREACH_CELL(grid, top, bot, left, right, code) \
|
||||
#define UGRID_FOREACH_CELL(grid, row, startcol, endcol, code) \
|
||||
do { \
|
||||
for (int row = top; row <= bot; row++) { \
|
||||
UCell *row_cells = (grid)->cells[row]; \
|
||||
for (int col = left; col <= right; col++) { \
|
||||
UCell *cell = row_cells + col; \
|
||||
(void)(cell); \
|
||||
code; \
|
||||
} \
|
||||
UCell *row_cells = (grid)->cells[row]; \
|
||||
for (int col = startcol; col < endcol; col++) { \
|
||||
UCell *cell = row_cells + col; \
|
||||
(void)(cell); \
|
||||
code; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
Reference in New Issue
Block a user