aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/textformat.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/textformat.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/textformat.c')
-rw-r--r--src/nvim/textformat.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/textformat.c b/src/nvim/textformat.c
index 13e51b9a9e..f2b30fd14b 100644
--- a/src/nvim/textformat.c
+++ b/src/nvim/textformat.c
@@ -1108,15 +1108,13 @@ void format_lines(linenr_T line_count, bool avoid_fex)
}
if (next_leader_len > 0) {
(void)del_bytes(next_leader_len, false, false);
- mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L,
- (long)-next_leader_len, 0);
+ mark_col_adjust(curwin->w_cursor.lnum, 0, 0, -next_leader_len, 0);
} else if (second_indent > 0) { // the "leader" for FO_Q_SECOND
int indent = (int)getwhitecols_curline();
if (indent > 0) {
(void)del_bytes(indent, false, false);
- mark_col_adjust(curwin->w_cursor.lnum,
- (colnr_T)0, 0L, (long)-indent, 0);
+ mark_col_adjust(curwin->w_cursor.lnum, 0, 0, -indent, 0);
}
}
curwin->w_cursor.lnum--;