aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-02 17:15:53 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-02 17:15:53 -0400
commit1ec5485db4bf55186e8e093541e859c3c32cb9fc (patch)
tree6d53a927dedced7cafb4d7a1c0e393a75b449a59
parent20eeb61fb22b8299c647f52eed943d499eecf44f (diff)
downloadrneovim-1ec5485db4bf55186e8e093541e859c3c32cb9fc.tar.gz
rneovim-1ec5485db4bf55186e8e093541e859c3c32cb9fc.tar.bz2
rneovim-1ec5485db4bf55186e8e093541e859c3c32cb9fc.zip
fold: add const to checkSmall() variables
-rw-r--r--src/nvim/fold.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c
index 9671d2ba5b..3807ea0d60 100644
--- a/src/nvim/fold.c
+++ b/src/nvim/fold.c
@@ -1530,14 +1530,11 @@ static bool check_closed(
*/
static void
checkSmall(
- win_T *wp,
- fold_T *fp,
- linenr_T lnum_off // offset for fp->fd_top
+ win_T *const wp,
+ fold_T *const fp,
+ const linenr_T lnum_off // offset for fp->fd_top
)
{
- int count;
- int n;
-
if (fp->fd_small == kNone) {
// Mark any nested folds to maybe-small
setSmallMaybe(&fp->fd_nested);
@@ -1545,8 +1542,8 @@ checkSmall(
if (fp->fd_len > curwin->w_p_fml) {
fp->fd_small = kFalse;
} else {
- count = 0;
- for (n = 0; n < fp->fd_len; n++) {
+ int count = 0;
+ for (int n = 0; n < fp->fd_len; n++) {
count += plines_win_nofold(wp, fp->fd_top + lnum_off + n);
if (count > curwin->w_p_fml) {
fp->fd_small = kFalse;