diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-02-11 14:14:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-11 14:14:24 +0100 |
commit | 27177e581902967dcf4f2f426464da1b636ca420 (patch) | |
tree | ba52f1e21ad2c4d4a00dc4af9fa602ae27bb86df /src/nvim/drawscreen.c | |
parent | 224a3c77caa6fea8299eb3be326fa6ff7300a21b (diff) | |
download | rneovim-27177e581902967dcf4f2f426464da1b636ca420.tar.gz rneovim-27177e581902967dcf4f2f426464da1b636ca420.tar.bz2 rneovim-27177e581902967dcf4f2f426464da1b636ca420.zip |
refactor: reduce scope of locals as per the style guide (#22211)
Diffstat (limited to 'src/nvim/drawscreen.c')
-rw-r--r-- | src/nvim/drawscreen.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index 04c342e068..2bc335a7e0 100644 --- a/src/nvim/drawscreen.c +++ b/src/nvim/drawscreen.c @@ -1620,8 +1620,6 @@ static void win_update(win_T *wp, DecorProviders *providers) && !(dollar_vcol >= 0 && mod_bot == mod_top + 1) && row >= top_end) { int old_rows = 0; - int new_rows = 0; - int xtra_rows; linenr_T l; int i; @@ -1656,6 +1654,7 @@ static void win_update(win_T *wp, DecorProviders *providers) bot_start = 0; bot_scroll_start = 0; } else { + int new_rows = 0; // Able to count old number of rows: Count new window // rows, and may insert/delete lines long j = idx; @@ -1674,7 +1673,7 @@ static void win_update(win_T *wp, DecorProviders *providers) break; } } - xtra_rows = new_rows - old_rows; + int xtra_rows = new_rows - old_rows; if (xtra_rows < 0) { // May scroll text up. If there is not enough // remaining text or scrolling fails, must redraw the |