diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-13 23:40:37 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-19 15:08:35 +0100 |
commit | ac1113ded5f8f09dd99a9894d7a7e795626fb728 (patch) | |
tree | 9cf615d03efafe2c44e539cb45f1b3df171b3e85 /src/nvim/indent.c | |
parent | 1798a4b5e9f0ae56cd800095f79423fea5cae8ca (diff) | |
download | rneovim-ac1113ded5f8f09dd99a9894d7a7e795626fb728.tar.gz rneovim-ac1113ded5f8f09dd99a9894d7a7e795626fb728.tar.bz2 rneovim-ac1113ded5f8f09dd99a9894d7a7e795626fb728.zip |
refactor: follow style guide
- reduce variable scope
- prefer initialization over declaration and assignment
Diffstat (limited to 'src/nvim/indent.c')
-rw-r--r-- | src/nvim/indent.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c index 89cf374152..6b08239f85 100644 --- a/src/nvim/indent.c +++ b/src/nvim/indent.c @@ -1183,15 +1183,15 @@ int get_expr_indent(void) // I tried to fix the first two issues. int get_lisp_indent(void) { - pos_T *pos, realpos, paren; + pos_T *pos; + pos_T paren; int amount; char *that; - int vi_lisp; // Set vi_lisp to use the vi-compatible method. - vi_lisp = (vim_strchr(p_cpo, CPO_LISP) != NULL); + int vi_lisp = (vim_strchr(p_cpo, CPO_LISP) != NULL); - realpos = curwin->w_cursor; + pos_T realpos = curwin->w_cursor; curwin->w_cursor.col = 0; if ((pos = findmatch(NULL, '(')) == NULL) { |