aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/textobject.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/textobject.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/textobject.c')
-rw-r--r--src/nvim/textobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/textobject.c b/src/nvim/textobject.c
index 18a56c74ca..3d156ba24e 100644
--- a/src/nvim/textobject.c
+++ b/src/nvim/textobject.c
@@ -733,7 +733,7 @@ int current_sent(oparg_T *oap, int count, bool include)
bool start_blank;
int c;
bool at_start_sent;
- long ncount;
+ int ncount;
start_pos = curwin->w_cursor;
pos = start_pos;
@@ -838,7 +838,7 @@ extend:
}
}
if (ncount > 0) {
- findsent_forward((int)ncount, true);
+ findsent_forward(ncount, true);
} else {
decl(&curwin->w_cursor);
}
@@ -1142,7 +1142,7 @@ int current_tagblock(oparg_T *oap, int count_arg, bool include)
again:
// Search backwards for unclosed "<aaa>".
// Put this position in start_pos.
- for (long n = 0; n < count; n++) {
+ for (int n = 0; n < count; n++) {
if (do_searchpair("<[^ \t>/!]\\+\\%(\\_s\\_[^>]\\{-}[^/]>\\|$\\|\\_s\\=>\\)",
"",
"</[^>]*>", BACKWARD, NULL, 0,