diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-12 15:54:54 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-13 23:39:56 +0100 |
commit | 28f4f3c48498086307ed825d1761edb5789ca0e8 (patch) | |
tree | 880d2104092261fe0457b17a9ddda8a6e0f7f2ed /src/nvim/popupmenu.c | |
parent | 48bcc7b9710d6db619b05254ea87f4087cdd9764 (diff) | |
download | rneovim-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/popupmenu.c')
-rw-r--r-- | src/nvim/popupmenu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/popupmenu.c b/src/nvim/popupmenu.c index 7db8fe01b7..4ed5d64c60 100644 --- a/src/nvim/popupmenu.c +++ b/src/nvim/popupmenu.c @@ -420,7 +420,6 @@ void pum_redraw(void) int row = 0; int attr_scroll = win_hl_attr(curwin, HLF_PSB); int attr_thumb = win_hl_attr(curwin, HLF_PST); - int i; char *s; char *p = NULL; int width; @@ -499,7 +498,7 @@ void pum_redraw(void) / (pum_size - pum_height); } - for (i = 0; i < pum_height; i++) { + for (int i = 0; i < pum_height; i++) { int idx = i + pum_first; const int *const attrs = (idx == pum_selected) ? attrsSel : attrsNorm; int attr = attrs[0]; // start with "word" highlight |