From 8e932480f61d6101bf8bea1abc07ed93826221fd Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 29 Sep 2023 14:58:48 +0200 Subject: 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. --- src/nvim/window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/window.c') diff --git a/src/nvim/window.c b/src/nvim/window.c index 04b5afe624..d56761a042 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -6619,8 +6619,8 @@ void scroll_to_fraction(win_T *wp, int prev_height) if (lnum < 1) { // can happen when starting up lnum = 1; } - wp->w_wrow = (int)((long)wp->w_fraction * (long)height - 1L) / FRACTION_MULT; - int line_size = plines_win_col(wp, lnum, (long)(wp->w_cursor.col)) - 1; + wp->w_wrow = (int)(wp->w_fraction * height - 1L) / FRACTION_MULT; + int line_size = plines_win_col(wp, lnum, wp->w_cursor.col) - 1; int sline = wp->w_wrow - line_size; if (sline >= 0) { @@ -6898,7 +6898,7 @@ char *grab_file_name(int count, linenr_T *file_lnum) if (file_lnum != NULL && ptr[len] == ':' && isdigit((uint8_t)ptr[len + 1])) { char *p = ptr + len + 1; - *file_lnum = (linenr_T)getdigits_long(&p, false, 0); + *file_lnum = getdigits_int32(&p, false, 0); } return find_file_name_in_path(ptr, len, options, count, curbuf->b_ffname); } -- cgit