aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/textformat.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/textformat.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/textformat.c')
-rw-r--r--src/nvim/textformat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/textformat.c b/src/nvim/textformat.c
index 25728ef0f1..61949fec6a 100644
--- a/src/nvim/textformat.c
+++ b/src/nvim/textformat.c
@@ -493,14 +493,14 @@ static int fmt_check_par(linenr_T lnum, int *leader_len, char_u **leader_flags,
/// @return true if line "lnum" ends in a white character.
static bool ends_in_white(linenr_T lnum)
{
- char_u *s = (char_u *)ml_get(lnum);
+ char *s = ml_get(lnum);
size_t l;
if (*s == NUL) {
return false;
}
- l = STRLEN(s) - 1;
- return ascii_iswhite(s[l]);
+ l = strlen(s) - 1;
+ return ascii_iswhite((uint8_t)s[l]);
}
/// @return true if the two comment leaders given are the same.