aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-09-29 14:58:48 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-10-03 22:02:55 +0200
commite72b546354cd90bf0cd8ee6dd045538d713009ad (patch)
tree680a28f2e9ca4ab5a3221afbffff4d64cfdef842 /src/nvim/buffer.c
parent70ec8d60e0dc71c5ca06fdd83698c82b16ea474f (diff)
downloadrneovim-e72b546354cd90bf0cd8ee6dd045538d713009ad.tar.gz
rneovim-e72b546354cd90bf0cd8ee6dd045538d713009ad.tar.bz2
rneovim-e72b546354cd90bf0cd8ee6dd045538d713009ad.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/buffer.c')
-rw-r--r--src/nvim/buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 5025e86771..076cf63913 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -3480,8 +3480,8 @@ void get_rel_pos(win_T *wp, char *buf, int buflen)
return;
}
- long above; // number of lines above window
- long below; // number of lines below window
+ linenr_T above; // number of lines above window
+ linenr_T below; // number of lines below window
above = wp->w_topline - 1;
above += win_get_fill(wp, wp->w_topline) - wp->w_topfill;
@@ -3580,7 +3580,7 @@ void ex_buffer_all(exarg_T *eap)
bool p_ea_save;
int open_wins = 0;
int r;
- long count; // Maximum number of windows to open.
+ linenr_T count; // Maximum number of windows to open.
int all; // When true also load inactive buffers.
int had_tab = cmdmod.cmod_tab;
tabpage_T *tpnext;