mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user