0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.1.0805: too many #ifdefs

Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 1.
This commit is contained in:
Bram Moolenaar
2019-01-24 15:04:48 +01:00
parent 4b9e91f0ba
commit 135059724f
17 changed files with 234 additions and 1147 deletions

View File

@@ -1057,11 +1057,9 @@ foldAdjustVisual(void)
end->col = (colnr_T)STRLEN(ptr);
if (end->col > 0 && *p_sel == 'o')
--end->col;
#ifdef FEAT_MBYTE
/* prevent cursor from moving on the trail byte */
if (has_mbyte)
mb_adjust_cursor();
#endif
}
}
@@ -1946,7 +1944,6 @@ get_foldtext(
* replace a TAB with a space. */
for (p = text; *p != NUL; ++p)
{
# ifdef FEAT_MBYTE
int len;
if (has_mbyte && (len = (*mb_ptr2len)(p)) > 1)
@@ -1956,7 +1953,6 @@ get_foldtext(
p += len - 1;
}
else
# endif
if (*p == TAB)
*p = ' ';
else if (ptr2cells(p) > 1)