aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/textformat.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 23:11:25 +0200
committerdundargoc <gocdundar@gmail.com>2022-10-15 13:18:46 +0200
commit04cdea5f4ac49fa62cc4091a5c26791b80b4cc4c (patch)
tree10e5be3cf91cee35ad2150e78b2d6aaa4ce5aa13 /src/nvim/textformat.c
parent433818351bc82550a1cb658f5d2ff060b9014d3c (diff)
downloadrneovim-04cdea5f4ac49fa62cc4091a5c26791b80b4cc4c.tar.gz
rneovim-04cdea5f4ac49fa62cc4091a5c26791b80b4cc4c.tar.bz2
rneovim-04cdea5f4ac49fa62cc4091a5c26791b80b4cc4c.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
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.