aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ugrid.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-12 15:54:54 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-13 23:39:56 +0100
commit28f4f3c48498086307ed825d1761edb5789ca0e8 (patch)
tree880d2104092261fe0457b17a9ddda8a6e0f7f2ed /src/nvim/ugrid.c
parent48bcc7b9710d6db619b05254ea87f4087cdd9764 (diff)
downloadrneovim-28f4f3c48498086307ed825d1761edb5789ca0e8.tar.gz
rneovim-28f4f3c48498086307ed825d1761edb5789ca0e8.tar.bz2
rneovim-28f4f3c48498086307ed825d1761edb5789ca0e8.zip
refactor: follow style guide
- reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values
Diffstat (limited to 'src/nvim/ugrid.c')
-rw-r--r--src/nvim/ugrid.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/ugrid.c b/src/nvim/ugrid.c
index 3a422ff2f2..f02b9626cd 100644
--- a/src/nvim/ugrid.c
+++ b/src/nvim/ugrid.c
@@ -61,10 +61,8 @@ void ugrid_scroll(UGrid *grid, int top, int bot, int left, int right, int count)
step = -1;
}
- int i;
-
// Copy cell data
- for (i = start; i != stop; i += step) {
+ for (int i = start; i != stop; i += step) {
UCell *target_row = grid->cells[i] + left;
UCell *source_row = grid->cells[i + count] + left;
assert(right >= left && left >= 0);