diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-12-27 22:49:44 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-12-27 22:49:44 +0100 |
commit | c1015121ec626cab6cb384f544bc0be1a1760c0e (patch) | |
tree | 6cc9a5d1899a4486a24c491e07d17a7dd01f9503 /src/nvim/ugrid.h | |
parent | 4f030ec24e0e148bbb83aedaef7dd629e5fef130 (diff) | |
parent | e1876c7ad1b5e30c0a9919e2c4587d11550c8507 (diff) | |
download | rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.tar.gz rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.tar.bz2 rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.zip |
Merge 'upstream/master' into pr-win-erw7
Diffstat (limited to 'src/nvim/ugrid.h')
-rw-r--r-- | src/nvim/ugrid.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/nvim/ugrid.h b/src/nvim/ugrid.h index af78fe91c5..33a706b8c0 100644 --- a/src/nvim/ugrid.h +++ b/src/nvim/ugrid.h @@ -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) |