diff options
Diffstat (limited to 'src/nvim/textformat.c')
-rw-r--r-- | src/nvim/textformat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/textformat.c b/src/nvim/textformat.c index 125146f712..5ded0c9ab2 100644 --- a/src/nvim/textformat.c +++ b/src/nvim/textformat.c @@ -470,7 +470,7 @@ static int fmt_check_par(linenr_T lnum, int *leader_len, char_u **leader_flags, char_u *flags = NULL; // init for GCC char_u *ptr; - ptr = ml_get(lnum); + ptr = (char_u *)ml_get(lnum); if (do_comments) { *leader_len = get_leader_len((char *)ptr, (char **)leader_flags, false, true); } else { @@ -493,7 +493,7 @@ 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 = ml_get(lnum); + char_u *s = (char_u *)ml_get(lnum); size_t l; if (*s == NUL) { @@ -552,9 +552,9 @@ static bool same_leader(linenr_T lnum, int leader1_len, char_u *leader1_flags, i // Get current line and next line, compare the leaders. // The first line has to be saved, only one line can be locked at a time. - line1 = vim_strsave(ml_get(lnum)); + line1 = vim_strsave((char_u *)ml_get(lnum)); for (idx1 = 0; ascii_iswhite(line1[idx1]); idx1++) {} - line2 = ml_get(lnum + 1); + line2 = (char_u *)ml_get(lnum + 1); for (idx2 = 0; idx2 < leader2_len; idx2++) { if (!ascii_iswhite(line2[idx2])) { if (line1[idx1++] != line2[idx2]) { @@ -586,7 +586,7 @@ static bool paragraph_start(linenr_T lnum) if (lnum <= 1) { return true; // start of the file } - p = ml_get(lnum - 1); + p = (char_u *)ml_get(lnum - 1); if (*p == NUL) { return true; // after empty line } |