aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-10-15 18:17:07 +0200
committerGitHub <noreply@github.com>2022-10-15 18:17:07 +0200
commitd4841e24dac9a16b8b90b212df20872badc4468e (patch)
tree921d79e13daf44adbfbc5585f7dc405b6429ed19 /src/nvim/getchar.c
parent0434f732a696248c24e111b558406f9534db6ca3 (diff)
parent04cdea5f4ac49fa62cc4091a5c26791b80b4cc4c (diff)
downloadrneovim-d4841e24dac9a16b8b90b212df20872badc4468e.tar.gz
rneovim-d4841e24dac9a16b8b90b212df20872badc4468e.tar.bz2
rneovim-d4841e24dac9a16b8b90b212df20872badc4468e.zip
Merge pull request #20140 from dundargoc/refactor/char_u/12
refactor: replace char_u with char 12: remove `STRLEN` part 2
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 4135065787..16f3c477f6 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -170,15 +170,15 @@ static char_u *get_buffcont(buffheader_T *buffer, int dozero)
/// K_SPECIAL in the returned string is escaped.
char_u *get_recorded(void)
{
- char_u *p;
+ char *p;
size_t len;
- p = get_buffcont(&recordbuff, true);
+ p = (char *)get_buffcont(&recordbuff, true);
free_buff(&recordbuff);
// Remove the characters that were added the last time, these must be the
// (possibly mapped) characters that stopped the recording.
- len = STRLEN(p);
+ len = strlen(p);
if (len >= last_recorded_len) {
len -= last_recorded_len;
p[len] = NUL;
@@ -190,7 +190,7 @@ char_u *get_recorded(void)
p[len - 1] = NUL;
}
- return p;
+ return (char_u *)p;
}
/// Return the contents of the redo buffer as a single string.
@@ -2237,7 +2237,7 @@ static int handle_mapping(int *keylenp, bool *timedout, int *mapdepth)
// If this is a LANGMAP mapping, then we didn't record the keys
// at the start of the function and have to record them now.
if (keylen > typebuf.tb_maplen && (mp->m_mode & MODE_LANGMAP) != 0) {
- gotchars((char_u *)map_str, STRLEN(map_str));
+ gotchars((char_u *)map_str, strlen(map_str));
}
if (save_m_noremap != REMAP_YES) {