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/buffer.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/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 076cf63913..86b16c18da 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -987,7 +987,7 @@ void handle_swap_exists(bufref_T *old_curbuf) || old_curbuf->br_buf == curbuf) { // Block autocommands here because curwin->w_buffer is NULL. block_autocmds(); - buf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED); + buf = buflist_new(NULL, NULL, 1, BLN_CURBUF | BLN_LISTED); unblock_autocmds(); } else { buf = old_curbuf->br_buf; @@ -1886,7 +1886,7 @@ buf_T *buflist_new(char *ffname_arg, char *sfname_arg, linenr_T lnum, int flags) emsg(_("W14: Warning: List of file names overflow")); if (emsg_silent == 0 && !in_assert_fails) { ui_flush(); - os_delay(3001L, true); // make sure it is noticed + os_delay(3001, true); // make sure it is noticed } top_file_num = 1; } @@ -3496,9 +3496,9 @@ void get_rel_pos(win_T *wp, char *buf, int buflen) } else if (above <= 0) { xstrlcpy(buf, _("Top"), (size_t)buflen); } else { - int perc = (above > 1000000L - ? (int)(above / ((above + below) / 100L)) - : (int)(above * 100L / (above + below))); + int perc = (above > 1000000 + ? (above / ((above + below) / 100)) + : (above * 100 / (above + below))); char *p = buf; size_t l = (size_t)buflen; |