diff options
author | dundargoc <gocdundar@gmail.com> | 2023-09-29 14:58:48 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-10-09 11:45:46 +0200 |
commit | 8e932480f61d6101bf8bea1abc07ed93826221fd (patch) | |
tree | 06cf8d0af6e786aba6d01343c54ba52b01738daa /src/nvim/window.c | |
parent | dacd34364ff3af98bc2d357c43e3ce06638e2ce9 (diff) | |
download | rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.tar.gz rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.tar.bz2 rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.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/window.c')
-rw-r--r-- | src/nvim/window.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |