aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/bufwrite.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/bufwrite.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/bufwrite.c')
-rw-r--r--src/nvim/bufwrite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/bufwrite.c b/src/nvim/bufwrite.c
index db813a3ae1..2e4dda78fc 100644
--- a/src/nvim/bufwrite.c
+++ b/src/nvim/bufwrite.c
@@ -1368,7 +1368,7 @@ int buf_write(buf_T *buf, char *fname, char *sfname, linenr_T start, linenr_T en
}
int no_eol = false; // no end-of-line written
- long nchars;
+ int nchars;
linenr_T lnum;
int fileformat;
int checking_conversion;
@@ -1789,7 +1789,7 @@ restore_backup:
if (msg_add_fileformat(fileformat)) {
insert_space = true;
}
- msg_add_lines(insert_space, (long)lnum, nchars); // add line/char count
+ msg_add_lines(insert_space, lnum, nchars); // add line/char count
if (!shortmess(SHM_WRITE)) {
if (append) {
xstrlcat(IObuff, shortmess(SHM_WRI) ? _(" [a]") : _(" appended"), IOSIZE);