aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/drawscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/drawscreen.c')
-rw-r--r--src/nvim/drawscreen.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c
index eee1348bc7..98077364a0 100644
--- a/src/nvim/drawscreen.c
+++ b/src/nvim/drawscreen.c
@@ -1647,11 +1647,11 @@ static void win_update(win_T *wp, DecorProviders *providers)
// When only displaying the lines at the top, set top_end. Used when
// window has scrolled down for msg_scrolled.
if (type == UPD_REDRAW_TOP) {
- long j = 0;
+ int j = 0;
for (int i = 0; i < wp->w_lines_valid; i++) {
j += wp->w_lines[i].wl_size;
if (j >= wp->w_upd_rows) {
- top_end = (int)j;
+ top_end = j;
break;
}
}
@@ -1684,7 +1684,7 @@ static void win_update(win_T *wp, DecorProviders *providers)
|| (wp->w_topline == wp->w_lines[0].wl_lnum
&& wp->w_topfill > wp->w_old_topfill))) {
// New topline is above old topline: May scroll down.
- long j;
+ int j;
if (hasAnyFolding(wp)) {
linenr_T ln;
@@ -1744,7 +1744,7 @@ static void win_update(win_T *wp, DecorProviders *providers)
// needs updating.
// try to find wp->w_topline in wp->w_lines[].wl_lnum
- long j = -1;
+ int j = -1;
int row = 0;
for (int i = 0; i < wp->w_lines_valid; i++) {
if (wp->w_lines[i].wl_valid
@@ -2151,7 +2151,7 @@ static void win_update(win_T *wp, DecorProviders *providers)
int new_rows = 0;
// Able to count old number of rows: Count new window
// rows, and may insert/delete lines
- long j = idx;
+ int j = idx;
for (l = lnum; l < mod_bot; l++) {
if (hasFoldingWin(wp, l, NULL, &l, true, NULL)) {
new_rows++;
@@ -2212,14 +2212,14 @@ static void win_update(win_T *wp, DecorProviders *providers)
while (true) {
// stop at last valid entry in w_lines[]
if (i >= wp->w_lines_valid) {
- wp->w_lines_valid = (int)j;
+ wp->w_lines_valid = j;
break;
}
wp->w_lines[j] = wp->w_lines[i];
// stop at a line that won't fit
if (x + (int)wp->w_lines[j].wl_size
> wp->w_grid.rows) {
- wp->w_lines_valid = (int)j + 1;
+ wp->w_lines_valid = j + 1;
break;
}
x += wp->w_lines[j++].wl_size;
@@ -2407,7 +2407,7 @@ static void win_update(win_T *wp, DecorProviders *providers)
} else {
if (eof) { // we hit the end of the file
wp->w_botline = buf->b_ml.ml_line_count + 1;
- long j = win_get_fill(wp, wp->w_botline);
+ int j = win_get_fill(wp, wp->w_botline);
if (j > 0 && !wp->w_botfill && row < wp->w_grid.rows) {
// Display filler text below last line. win_line() will check
// for ml_line_count+1 and only draw filler lines