aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.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-11-05 20:19:06 +0100
commitacc646ad8fc3ef11fcc63b69f3d8484e4a91accd (patch)
tree613753f19fe6f6fa45884750eb176c1517269ec2 /src/nvim/mark.c
parentc513cbf361000e6f09cd5b71b718e9de3f88904d (diff)
downloadrneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.tar.gz
rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.tar.bz2
rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.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/mark.c')
-rw-r--r--src/nvim/mark.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c
index 19fad179c6..1885ec74cd 100644
--- a/src/nvim/mark.c
+++ b/src/nvim/mark.c
@@ -441,11 +441,11 @@ fmark_T *mark_get_motion(buf_T *buf, win_T *win, int name)
listcmd_busy = true; // avoid that '' is changed
if (name == '{' || name == '}') { // to previous/next paragraph
oparg_T oa;
- if (findpar(&oa.inclusive, name == '}' ? FORWARD : BACKWARD, 1L, NUL, false)) {
+ if (findpar(&oa.inclusive, name == '}' ? FORWARD : BACKWARD, 1, NUL, false)) {
mark = pos_to_mark(buf, NULL, win->w_cursor);
}
} else if (name == '(' || name == ')') { // to previous/next sentence
- if (findsent(name == ')' ? FORWARD : BACKWARD, 1L)) {
+ if (findsent(name == ')' ? FORWARD : BACKWARD, 1)) {
mark = pos_to_mark(buf, NULL, win->w_cursor);
}
}
@@ -1064,10 +1064,10 @@ void ex_changes(exarg_T *eap)
if (got_int) {
break;
}
- snprintf(IObuff, IOSIZE, "%c %3d %5ld %4d ",
+ snprintf(IObuff, IOSIZE, "%c %3d %5" PRIdLINENR " %4d ",
i == curwin->w_changelistidx ? '>' : ' ',
i > curwin->w_changelistidx ? i - curwin->w_changelistidx : curwin->w_changelistidx - i,
- (long)curbuf->b_changelist[i].mark.lnum,
+ curbuf->b_changelist[i].mark.lnum,
curbuf->b_changelist[i].mark.col);
msg_outtrans(IObuff, 0);
name = mark_line(&curbuf->b_changelist[i].mark, 17);
@@ -1143,7 +1143,7 @@ void mark_adjust_buf(buf_T *buf, linenr_T line1, linenr_T line2, linenr_T amount
linenr_T *lp;
static pos_T initpos = { 1, 0, 0 };
- if (line2 < line1 && amount_after == 0L) { // nothing to do
+ if (line2 < line1 && amount_after == 0) { // nothing to do
return;
}
@@ -1321,7 +1321,7 @@ void mark_col_adjust(linenr_T lnum, colnr_T mincol, linenr_T lnum_amount, colnr_
int fnum = curbuf->b_fnum;
pos_T *posp;
- if ((col_amount == 0L && lnum_amount == 0L) || (cmdmod.cmod_flags & CMOD_LOCKMARKS)) {
+ if ((col_amount == 0 && lnum_amount == 0) || (cmdmod.cmod_flags & CMOD_LOCKMARKS)) {
return; // nothing to do
}
// named marks, lower case and upper case