diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-06-10 19:28:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 19:28:47 +0200 |
commit | 673b3a780e969132330099c9b6008a766280e384 (patch) | |
tree | cd6b0dbad292dcbfaae637ffad385298594a2ff2 /src/nvim/move.c | |
parent | e15d31b530c443daea04d7a772b24da737397c53 (diff) | |
parent | a732c253b71f89702285d5ec6fd7803045f6add9 (diff) | |
download | rneovim-673b3a780e969132330099c9b6008a766280e384.tar.gz rneovim-673b3a780e969132330099c9b6008a766280e384.tar.bz2 rneovim-673b3a780e969132330099c9b6008a766280e384.zip |
Merge pull request #18461 from dundargoc/refactor/change-linenr-to-int32
refactor: change type of linenr_T from long to int32_t
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r-- | src/nvim/move.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index 8c927d30d1..9d0099a2f8 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -1146,8 +1146,8 @@ bool scrollup(long line_count, int byfold) curwin->w_botline += lnum - curwin->w_topline; curwin->w_topline = lnum; } else { - curwin->w_topline += line_count; - curwin->w_botline += line_count; // approximate w_botline + curwin->w_topline += (linenr_T)line_count; + curwin->w_botline += (linenr_T)line_count; // approximate w_botline } if (curwin->w_topline > curbuf->b_ml.ml_line_count) { @@ -1903,7 +1903,7 @@ int onepage(Direction dir, long count) if (p_window <= 2) { ++curwin->w_topline; } else { - curwin->w_topline += p_window - 2; + curwin->w_topline += (linenr_T)p_window - 2; } if (curwin->w_topline > curbuf->b_ml.ml_line_count) { curwin->w_topline = curbuf->b_ml.ml_line_count; @@ -1939,12 +1939,12 @@ int onepage(Direction dir, long count) if (p_window <= 2) { --curwin->w_topline; } else { - curwin->w_topline -= p_window - 2; + curwin->w_topline -= (linenr_T)p_window - 2; } if (curwin->w_topline < 1) { curwin->w_topline = 1; } - curwin->w_cursor.lnum = curwin->w_topline + p_window - 1; + curwin->w_cursor.lnum = curwin->w_topline + (linenr_T)p_window - 1; if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count) { curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count; } |