diff options
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 7d48158b4f..095dc0037b 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -1411,7 +1411,7 @@ static int may_do_command_line_next_incsearch(int firstc, long count, incsearch_ static void command_line_next_histidx(CommandLineState *s, bool next_match) { - int j = (int)STRLEN(s->lookfor); + int j = (int)strlen(s->lookfor); for (;;) { // one step backwards if (!next_match) { @@ -1920,7 +1920,7 @@ static int command_line_handle_key(CommandLineState *s) STRCPY(ccline.cmdbuff, p); } - ccline.cmdpos = ccline.cmdlen = (int)STRLEN(ccline.cmdbuff); + ccline.cmdpos = ccline.cmdlen = (int)strlen(ccline.cmdbuff); redrawcmd(); return command_line_changed(s); } @@ -2027,7 +2027,7 @@ static int command_line_not_changed(CommandLineState *s) /// as a trailing \|, which can happen while typing a pattern. static int empty_pattern(char *p) { - size_t n = STRLEN(p); + size_t n = strlen(p); // remove trailing \v and the like while (n >= 2 && p[n - 2] == '\\' @@ -2803,7 +2803,7 @@ static void color_expr_cmdline(const CmdlineInfo *const colored_ccline, ParserLine parser_lines[] = { { .data = (const char *)colored_ccline->cmdbuff, - .size = STRLEN(colored_ccline->cmdbuff), + .size = strlen(colored_ccline->cmdbuff), .allocated = false, }, { NULL, 0, false }, @@ -3377,7 +3377,7 @@ void unputcmdline(void) } // Put the given string, of the given length, onto the command line. -// If len is -1, then STRLEN() is used to calculate the length. +// If len is -1, then strlen() is used to calculate the length. // If 'redraw' is true then the new part of the command line, and the remaining // part will be redrawn, otherwise it will not. If this function is called // twice in a row, then 'redraw' should be false and redrawcmd() should be @@ -3863,7 +3863,7 @@ char *vim_strsave_fnameescape(const char *const fname, const int what) /// Put a backslash before the file name in "pp", which is in allocated memory. void escape_fname(char **pp) { - char_u *p = xmalloc(STRLEN(*pp) + 2); + char_u *p = xmalloc(strlen(*pp) + 2); p[0] = '\\'; STRCPY(p + 1, *pp); xfree(*pp); @@ -4010,7 +4010,7 @@ static int set_cmdline_str(const char *str, int pos) return 1; } - int len = (int)STRLEN(str); + int len = (int)strlen(str); realloc_cmdbuff(len + 1); p->cmdlen = len; STRCPY(p->cmdbuff, str); @@ -4347,7 +4347,7 @@ static int open_cmdwin(void) ccline.cmdpos = 0; cmdwin_result = Ctrl_C; } else { - ccline.cmdlen = (int)STRLEN(ccline.cmdbuff); + ccline.cmdlen = (int)strlen(ccline.cmdbuff); ccline.cmdbufflen = ccline.cmdlen + 1; ccline.cmdpos = curwin->w_cursor.col; if (ccline.cmdpos > ccline.cmdlen) { @@ -4420,7 +4420,7 @@ char *script_get(exarg_T *const eap, size_t *const lenp) const char *const cmd = (const char *)eap->arg; if (cmd[0] != '<' || cmd[1] != '<' || eap->getline == NULL) { - *lenp = STRLEN(eap->arg); + *lenp = strlen(eap->arg); return eap->skip ? NULL : xmemdupz(eap->arg, *lenp); } |