src/nvim/screen.c
/// Put a unicode char, and up to MAX_MCO composing chars, in a screen cell.
Put a unicode char, and up to MAX_MCO composing chars, in a screen cell.
Put a unicode char and up to MAX_MCO composing chars in a screen cell .
static int schar_from_cc(char_u *p, int c, int u8cc[MAX_MCO])
{
  int len = utf_char2bytes(c, p);
  for (int i = 0; i < MAX_MCO; i++) {
    if (u8cc[i] == 0) {
      break;
    }
    len += utf_char2bytes(u8cc[i], p + len);
  }
  p[len] = 0;
  return len;
}
static int schar_from_cc ( char_u * p , int c , int u8cc [ MAX_MCO ] ) { int len = utf_char2bytes ( c , p ) ; for ( int i = 0 ; i < MAX_MCO ; i ++ ) { if ( u8cc [ i ] == 0 ) { break ; } len += utf_char2bytes ( u8cc [ i ] , p + len ) ; } p [ len ] = 0 ; return len ; }
Put a unicode char, and up to MAX_MCO composing chars, in a screen cell.
Put a unicode char and up to MAX_MCO composing chars in a screen cell .