aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/change.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-09-29 14:58:48 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-10-09 11:45:46 +0200
commit8e932480f61d6101bf8bea1abc07ed93826221fd (patch)
tree06cf8d0af6e786aba6d01343c54ba52b01738daa /src/nvim/change.c
parentdacd34364ff3af98bc2d357c43e3ce06638e2ce9 (diff)
downloadrneovim-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/change.c')
-rw-r--r--src/nvim/change.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c
index abbfe2505e..acc657a1c2 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -831,7 +831,7 @@ int del_chars(int count, int fixpos)
{
int bytes = 0;
char *p = get_cursor_pos_ptr();
- for (long i = 0; i < count && *p != NUL; i++) {
+ for (int i = 0; i < count && *p != NUL; i++) {
int l = utfc_ptr2len(p);
bytes += l;
p += l;
@@ -1829,7 +1829,7 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment)
if (flags & OPENLINE_MARKFIX) {
mark_col_adjust(curwin->w_cursor.lnum,
curwin->w_cursor.col + less_cols_off,
- 1L, (long)-less_cols, 0);
+ 1L, -less_cols, 0);
}
// Always move extmarks - Here we move only the line where the
// cursor is, the previous mark_adjust takes care of the lines after