mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 03:08:27 +00:00
refactor(multibyte): eliminate mb_char2cells alias for utf_char2cells
This commit is contained in:
@@ -3279,7 +3279,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
|
||||
|
||||
// If a double-width char doesn't fit display a '>' in the last column.
|
||||
if ((wp->w_p_rl ? (col <= 0) : (col >= grid->Columns - 1))
|
||||
&& (*mb_char2cells)(mb_c) == 2) {
|
||||
&& utf_char2cells(mb_c) == 2) {
|
||||
c = '>';
|
||||
mb_c = c;
|
||||
mb_l = 1;
|
||||
@@ -3393,7 +3393,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
|
||||
// next line.
|
||||
if ((wp->w_p_rl ? (col <= 0) :
|
||||
(col >= grid->Columns - 1))
|
||||
&& (*mb_char2cells)(mb_c) == 2) {
|
||||
&& utf_char2cells(mb_c) == 2) {
|
||||
c = '>';
|
||||
mb_c = c;
|
||||
mb_utf8 = false;
|
||||
@@ -3964,7 +3964,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
|
||||
&& c != NUL) {
|
||||
c = wp->w_p_lcs_chars.prec;
|
||||
lcs_prec_todo = NUL;
|
||||
if ((*mb_char2cells)(mb_c) > 1) {
|
||||
if (utf_char2cells(mb_c) > 1) {
|
||||
// Double-width character being overwritten by the "precedes"
|
||||
// character, need to fill up half the character.
|
||||
c_extra = MB_FILLER_CHAR;
|
||||
@@ -4275,7 +4275,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
|
||||
//
|
||||
// Store the character.
|
||||
//
|
||||
if (wp->w_p_rl && (*mb_char2cells)(mb_c) > 1) {
|
||||
if (wp->w_p_rl && utf_char2cells(mb_c) > 1) {
|
||||
// A double-wide character is: put first halve in left cell.
|
||||
off--;
|
||||
col--;
|
||||
@@ -4292,7 +4292,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
|
||||
linebuf_attr[off] = char_attr;
|
||||
}
|
||||
|
||||
if ((*mb_char2cells)(mb_c) > 1) {
|
||||
if (utf_char2cells(mb_c) > 1) {
|
||||
// Need to fill two screen columns.
|
||||
off++;
|
||||
col++;
|
||||
@@ -4353,7 +4353,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
|
||||
}
|
||||
|
||||
|
||||
if ((*mb_char2cells)(mb_c) > 1) {
|
||||
if (utf_char2cells(mb_c) > 1) {
|
||||
// Need to fill two screen columns.
|
||||
if (wp->w_p_rl) {
|
||||
--boguscols;
|
||||
|
Reference in New Issue
Block a user