aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/change.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-04-17 22:18:58 +0200
committerdundargoc <gocdundar@gmail.com>2023-07-03 12:49:09 +0200
commitfcf3519c65a2d6736de437f686e788684a6c8564 (patch)
tree2c5ae2854f3688497b05f80bd0302feb9162a308 /src/nvim/change.c
parentf771d6247147b393238fe57065a96fb5e9635358 (diff)
downloadrneovim-fcf3519c65a2d6736de437f686e788684a6c8564.tar.gz
rneovim-fcf3519c65a2d6736de437f686e788684a6c8564.tar.bz2
rneovim-fcf3519c65a2d6736de437f686e788684a6c8564.zip
refactor: remove long
long is 32-bits even on 64-bit windows which makes the type suboptimal for a codebase meant to be cross-platform.
Diffstat (limited to 'src/nvim/change.c')
-rw-r--r--src/nvim/change.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c
index 9e1767c2f3..932de727b5 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -441,7 +441,7 @@ void appended_lines(linenr_T lnum, linenr_T count)
}
/// Like appended_lines(), but adjust marks first.
-void appended_lines_mark(linenr_T lnum, long count)
+void appended_lines_mark(linenr_T lnum, int count)
{
mark_adjust(lnum + 1, (linenr_T)MAXLNUM, (linenr_T)count, 0L, kExtmarkUndo);
changed_lines(lnum + 1, 0, lnum + 1, (linenr_T)count, true);
@@ -458,7 +458,7 @@ void deleted_lines(linenr_T lnum, linenr_T count)
/// Like deleted_lines(), but adjust marks first.
/// Make sure the cursor is on a valid line before calling, a GUI callback may
/// be triggered to display the cursor.
-void deleted_lines_mark(linenr_T lnum, long count)
+void deleted_lines_mark(linenr_T lnum, int count)
{
bool made_empty = (count > 0) && curbuf->b_ml.ml_flags & ML_EMPTY;
@@ -812,7 +812,7 @@ int del_char(bool fixpos)
}
/// Like del_bytes(), but delete characters instead of bytes.
-int del_chars(long count, int fixpos)
+int del_chars(int count, int fixpos)
{
int bytes = 0;
char *p = get_cursor_pos_ptr();
@@ -1928,7 +1928,7 @@ void truncate_line(int fixpos)
/// Saves the lines for undo first if "undo" is true.
void del_lines(long nlines, bool undo)
{
- long n;
+ int n;
linenr_T first = curwin->w_cursor.lnum;
if (nlines <= 0) {