floats: add borders (MS-DOS MODE)

This commit is contained in:
Björn Linse
2021-02-22 16:08:24 +01:00
parent e5cfc7f3a0
commit 243820ebd0
16 changed files with 433 additions and 30 deletions

View File

@@ -571,11 +571,12 @@ size_t mb_string2cells(const char_u *str)
/// @param size maximum length of string. It will terminate on earlier NUL.
/// @return The number of cells occupied by string `str`
size_t mb_string2cells_len(const char_u *str, size_t size)
FUNC_ATTR_NONNULL_ARG(1)
{
size_t clen = 0;
for (const char_u *p = str; *p != NUL && p < str+size;
p += utf_ptr2len_len(p, size+(p-str))) {
p += utfc_ptr2len_len(p, size+(p-str))) {
clen += utf_ptr2cells(p);
}