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/undo.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/undo.c')
-rw-r--r-- | src/nvim/undo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 7a109ba4d3..4ced4e93c4 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -2009,7 +2009,7 @@ void undo_time(int step, bool sec, bool file, bool absolute) } } } - long closest_start = closest; + int closest_start = closest; int closest_seq = curbuf->b_u_seq_cur; int mark; int nomark = 0; // shut up compiler @@ -2611,7 +2611,7 @@ static void u_undo_end(bool did_undo, bool absolute, bool quiet) u_oldcount < 0 ? (int64_t)-u_oldcount : (int64_t)u_oldcount, _(msgstr), did_undo ? _("before") : _("after"), - uhp == NULL ? (int64_t)0L : (int64_t)uhp->uh_seq, + uhp == NULL ? 0 : (int64_t)uhp->uh_seq, msgbuf); } @@ -2622,7 +2622,7 @@ void undo_fmt_time(char *buf, size_t buflen, time_t tt) struct tm curtime; os_localtime_r(&tt, &curtime); size_t n; - if (time(NULL) - tt < (60L * 60L * 12L)) { + if (time(NULL) - tt < (60 * 60 * 12)) { // within 12 hours n = strftime(buf, buflen, "%H:%M:%S", &curtime); } else { |