aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorZviRackover <zvirack@gmail.com>2018-08-11 17:14:10 +0300
committerJustin M. Keyes <justinkz@gmail.com>2018-08-11 16:14:10 +0200
commit22311457ab60be9335f8e630c8b794340d39e466 (patch)
treeb0b1a1a32009fd80cfeb2b77ffeae9202b21bbff /src/nvim/ex_cmds.c
parent6aefae8c4e6e273ae96f1135b74a081543b548e5 (diff)
downloadrneovim-22311457ab60be9335f8e630c8b794340d39e466.tar.gz
rneovim-22311457ab60be9335f8e630c8b794340d39e466.tar.bz2
rneovim-22311457ab60be9335f8e630c8b794340d39e466.zip
refactor: Replace vim_strrchr() with strrchar() (#8718)
ref #1474
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 1420a9aae4..4dcecae9d8 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -307,9 +307,12 @@ static int linelen(int *has_tab)
;
save = *last;
*last = NUL;
- len = linetabsize(line); /* get line length */
- if (has_tab != NULL) /* check for embedded TAB */
- *has_tab = (vim_strrchr(first, TAB) != NULL);
+ // Get line length.
+ len = linetabsize(line);
+ // Check for embedded TAB.
+ if (has_tab != NULL) {
+ *has_tab = STRRCHR(first, TAB) != NULL;
+ }
*last = save;
return len;
@@ -5016,8 +5019,8 @@ void fix_help_buffer(void)
if (fnamencmp(f1, f2, t1 - f1) != 0) {
continue;
}
- const char_u *const e1 = vim_strrchr(t1, '.');
- const char_u *const e2 = vim_strrchr(path_tail(f2), '.');
+ const char_u *const e1 = STRRCHR(t1, '.');
+ const char_u *const e2 = STRRCHR(path_tail(f2), '.');
if (e1 == NULL || e2 == NULL) {
continue;
}