diff options
author | dundargoc <gocdundar@gmail.com> | 2023-04-17 22:18:58 +0200 |
---|---|---|
committer | dundargoc <gocdundar@gmail.com> | 2023-07-03 12:49:09 +0200 |
commit | fcf3519c65a2d6736de437f686e788684a6c8564 (patch) | |
tree | 2c5ae2854f3688497b05f80bd0302feb9162a308 /src/nvim/tag.c | |
parent | f771d6247147b393238fe57065a96fb5e9635358 (diff) | |
download | rneovim-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/tag.c')
-rw-r--r-- | src/nvim/tag.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 4fe669631f..d1f4903294 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -1020,10 +1020,10 @@ static int add_llist_tags(char *tag, int num_matches, char **matches) // Get the line number or the search pattern used to locate // the tag. - long lnum = 0; + linenr_T lnum = 0; if (isdigit((uint8_t)(*tagp.command))) { // Line number is used to locate the tag - lnum = atol(tagp.command); + lnum = atoi(tagp.command); } else { char *cmd_start, *cmd_end; @@ -2979,15 +2979,14 @@ static int jumpto_tag(const char *lbuf_arg, int forceit, int keep_help) // start search before first line curwin->w_cursor.lnum = 0; } - if (do_search(NULL, pbuf[0], pbuf[0], pbuf + 1, (long)1, - search_options, NULL)) { + if (do_search(NULL, pbuf[0], pbuf[0], pbuf + 1, 1, search_options, NULL)) { retval = OK; } else { int found = 1; // try again, ignore case now p_ic = true; - if (!do_search(NULL, pbuf[0], pbuf[0], pbuf + 1, (long)1, + if (!do_search(NULL, pbuf[0], pbuf[0], pbuf + 1, 1, search_options, NULL)) { // Failed to find pattern, take a guess: "^func (" found = 2; @@ -2995,11 +2994,11 @@ static int jumpto_tag(const char *lbuf_arg, int forceit, int keep_help) char cc = *tagp.tagname_end; *tagp.tagname_end = NUL; snprintf(pbuf, LSIZE, "^%s\\s\\*(", tagp.tagname); - if (!do_search(NULL, '/', '/', pbuf, (long)1, search_options, NULL)) { + if (!do_search(NULL, '/', '/', pbuf, 1, search_options, NULL)) { // Guess again: "^char * \<func (" snprintf(pbuf, LSIZE, "^\\[#a-zA-Z_]\\.\\*\\<%s\\s\\*(", tagp.tagname); - if (!do_search(NULL, '/', '/', pbuf, (long)1, search_options, NULL)) { + if (!do_search(NULL, '/', '/', pbuf, 1, search_options, NULL)) { found = 0; } } |