mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
screen.c: remove dead code
As stated in globals.h, mbyte flags are deprecated, and code using it can be refractored to remove dead code. Since has_mbyte is defined to true, this refractoring correct.
This commit is contained in:
parent
04fb65fd76
commit
83666f3ce2
@ -4880,33 +4880,30 @@ void win_redr_status(win_T *wp)
|
||||
}
|
||||
|
||||
this_ru_col = ru_col - (Columns - wp->w_width);
|
||||
if (this_ru_col < (wp->w_width + 1) / 2)
|
||||
if (this_ru_col < (wp->w_width + 1) / 2) {
|
||||
this_ru_col = (wp->w_width + 1) / 2;
|
||||
}
|
||||
if (this_ru_col <= 1) {
|
||||
p = (char_u *)"<"; /* No room for file name! */
|
||||
p = (char_u *)"<"; // No room for file name!
|
||||
len = 1;
|
||||
} else if (has_mbyte) {
|
||||
} else {
|
||||
int clen = 0, i;
|
||||
|
||||
/* Count total number of display cells. */
|
||||
clen = (int) mb_string2cells(p);
|
||||
// Count total number of display cells.
|
||||
clen = (int)mb_string2cells(p);
|
||||
|
||||
/* Find first character that will fit.
|
||||
* Going from start to end is much faster for DBCS. */
|
||||
// Find first character that will fit.
|
||||
// Going from start to end is much faster for DBCS.
|
||||
for (i = 0; p[i] != NUL && clen >= this_ru_col - 1;
|
||||
i += (*mb_ptr2len)(p + i))
|
||||
i += (*mb_ptr2len)(p + i)) {
|
||||
clen -= (*mb_ptr2cells)(p + i);
|
||||
}
|
||||
len = clen;
|
||||
if (i > 0) {
|
||||
p = p + i - 1;
|
||||
*p = '<';
|
||||
++len;
|
||||
}
|
||||
|
||||
} else if (len > this_ru_col - 1) {
|
||||
p += len - (this_ru_col - 1);
|
||||
*p = '<';
|
||||
len = this_ru_col - 1;
|
||||
}
|
||||
|
||||
row = wp->w_winrow + wp->w_height;
|
||||
|
Loading…
Reference in New Issue
Block a user