aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-06-10 19:28:47 +0200
committerGitHub <noreply@github.com>2022-06-10 19:28:47 +0200
commit673b3a780e969132330099c9b6008a766280e384 (patch)
treecd6b0dbad292dcbfaae637ffad385298594a2ff2 /src/nvim/ex_cmds.c
parente15d31b530c443daea04d7a772b24da737397c53 (diff)
parenta732c253b71f89702285d5ec6fd7803045f6add9 (diff)
downloadrneovim-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/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 7e56f131ba..6fa3f1b427 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -439,7 +439,7 @@ static int sort_compare(const void *s1, const void *s2)
// If two lines have the same value, preserve the original line order.
if (result == 0) {
- return (int)(l1.lnum - l2.lnum);
+ return l1.lnum - l2.lnum;
}
return result;
}
@@ -451,7 +451,7 @@ void ex_sort(exarg_T *eap)
int len;
linenr_T lnum;
long maxlen = 0;
- size_t count = (size_t)(eap->line2 - eap->line1 + 1);
+ size_t count = eap->line2 - eap->line1 + 1;
size_t i;
char *p;
char *s;
@@ -5934,7 +5934,7 @@ static int show_sub(exarg_T *eap, pos_T old_cusr, PreviewLines *preview_lines, i
}
}
// Put "|lnum| line" into `str` and append it to the preview buffer.
- snprintf(str, line_size, "|%*ld| %s", col_width - 3,
+ snprintf(str, line_size, "|%*" PRIdLINENR "| %s", col_width - 3,
next_linenr, line);
// Temporarily switch to preview buffer
aucmd_prepbuf(&aco, cmdpreview_buf);