aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-07-03 13:17:37 +0200
committerGitHub <noreply@github.com>2023-07-03 13:17:37 +0200
commit5f442e1a4a831ed2eb70d5c2dd66c47b0b8aa7e1 (patch)
tree2c5ae2854f3688497b05f80bd0302feb9162a308 /src/nvim/buffer.c
parentf771d6247147b393238fe57065a96fb5e9635358 (diff)
parentfcf3519c65a2d6736de437f686e788684a6c8564 (diff)
downloadrneovim-5f442e1a4a831ed2eb70d5c2dd66c47b0b8aa7e1.tar.gz
rneovim-5f442e1a4a831ed2eb70d5c2dd66c47b0b8aa7e1.tar.bz2
rneovim-5f442e1a4a831ed2eb70d5c2dd66c47b0b8aa7e1.zip
Merge pull request #23167 from dundargoc/refactor/long
refactor: remove long
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index a07b1c5720..fd912a65e0 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -3192,12 +3192,12 @@ void fileinfo(int fullname, int shorthelp, int dont_truncate)
? " " : "");
// With 32 bit longs and more than 21,474,836 lines multiplying by 100
// causes an overflow, thus for large numbers divide instead.
- if (curwin->w_cursor.lnum > 1000000L) {
- n = (int)(((long)curwin->w_cursor.lnum) /
- ((long)curbuf->b_ml.ml_line_count / 100L));
+ if (curwin->w_cursor.lnum > 1000000) {
+ n = ((curwin->w_cursor.lnum) /
+ (curbuf->b_ml.ml_line_count / 100));
} else {
- n = (int)(((long)curwin->w_cursor.lnum * 100L) /
- (long)curbuf->b_ml.ml_line_count);
+ n = ((curwin->w_cursor.lnum * 100) /
+ curbuf->b_ml.ml_line_count);
}
if (curbuf->b_ml.ml_flags & ML_EMPTY) {
vim_snprintf_add(buffer, IOSIZE, "%s", _(no_lines_msg));