diff options
author | dundargoc <gocdundar@gmail.com> | 2023-09-29 14:58:48 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-05 20:19:06 +0100 |
commit | acc646ad8fc3ef11fcc63b69f3d8484e4a91accd (patch) | |
tree | 613753f19fe6f6fa45884750eb176c1517269ec2 /src/nvim/fold.c | |
parent | c513cbf361000e6f09cd5b71b718e9de3f88904d (diff) | |
download | rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.tar.gz rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.tar.bz2 rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.zip |
refactor: the long goodbye
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r-- | src/nvim/fold.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index a3aabede5e..fa33abdce7 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -650,7 +650,7 @@ void foldCreate(win_T *wp, pos_T start, pos_T end) // We want the new fold to be closed. If it would remain open because // of using 'foldlevel', need to adjust fd_flags of containing folds. if (use_level && !closed && level < wp->w_p_fdl) { - closeFold(start, 1L); + closeFold(start, 1); } if (!use_level) { wp->w_fold_manual = true; @@ -748,7 +748,7 @@ void deleteFold(win_T *const wp, const linenr_T start, const linenr_T end, const } if (last_lnum > 0) { - changed_lines(wp->w_buffer, first_lnum, (colnr_T)0, last_lnum, 0L, false); + changed_lines(wp->w_buffer, first_lnum, (colnr_T)0, last_lnum, 0, false); // send one nvim_buf_lines_event at the end // last_lnum is the line *after* the last line of the outermost fold @@ -1584,7 +1584,7 @@ static void foldCreateMarkers(win_T *wp, pos_T start, pos_T end) // Update both changes here, to avoid all folds after the start are // changed when the start marker is inserted and the end isn't. - changed_lines(buf, start.lnum, (colnr_T)0, end.lnum, 0L, false); + changed_lines(buf, start.lnum, (colnr_T)0, end.lnum, 0, false); // Note: foldAddMarker() may not actually change start and/or end if // u_save() is unable to save the buffer line, but we send the @@ -2295,7 +2295,7 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *const gap, const int level, // nested folds (with relative line numbers) down. foldMarkAdjustRecurse(flp->wp, &fp->fd_nested, (linenr_T)0, (linenr_T)MAXLNUM, - (fp->fd_top - firstlnum), 0L); + (fp->fd_top - firstlnum), 0); } else { // Will move fold down, move nested folds relatively up. foldMarkAdjustRecurse(flp->wp, &fp->fd_nested, @@ -2367,7 +2367,7 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *const gap, const int level, fp->fd_len = startlnum - fp->fd_top; foldMarkAdjustRecurse(flp->wp, &fp->fd_nested, fp->fd_len, (linenr_T)MAXLNUM, - (linenr_T)MAXLNUM, 0L); + (linenr_T)MAXLNUM, 0); fold_changed = true; } } else { @@ -2861,7 +2861,7 @@ static void foldMerge(win_T *const wp, fold_T *fp1, garray_T *gap, fold_T *fp2) // If the last nested fold in fp1 touches the first nested fold in fp2, // merge them recursively. - if (foldFind(gap1, fp1->fd_len - 1, &fp3) && foldFind(gap2, 0L, &fp4)) { + if (foldFind(gap1, fp1->fd_len - 1, &fp3) && foldFind(gap2, 0, &fp4)) { foldMerge(wp, fp3, gap2, fp4); } |