mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor(message): msg_outtrans_long_len_attr -> msg_outtrans_long
This commit is contained in:
parent
af7d317f3f
commit
b07fd0e988
@ -976,7 +976,7 @@ static void showmatches_oneline(expand_T *xp, char **matches, int numMatches, in
|
|||||||
msg_advance(maxlen + 1);
|
msg_advance(maxlen + 1);
|
||||||
msg_puts(p);
|
msg_puts(p);
|
||||||
msg_advance(maxlen + 3);
|
msg_advance(maxlen + 3);
|
||||||
msg_outtrans_long_attr(p + 2, HL_ATTR(HLF_D));
|
msg_outtrans_long(p + 2, HL_ATTR(HLF_D));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (int i = maxlen - lastlen; --i >= 0;) {
|
for (int i = maxlen - lastlen; --i >= 0;) {
|
||||||
|
@ -2024,17 +2024,11 @@ void msg_puts_title(const char *s)
|
|||||||
/// Show a message in such a way that it always fits in the line. Cut out a
|
/// Show a message in such a way that it always fits in the line. Cut out a
|
||||||
/// part in the middle and replace it with "..." when necessary.
|
/// part in the middle and replace it with "..." when necessary.
|
||||||
/// Does not handle multi-byte characters!
|
/// Does not handle multi-byte characters!
|
||||||
void msg_outtrans_long_attr(const char *longstr, int attr)
|
void msg_outtrans_long(const char *longstr, int attr)
|
||||||
{
|
|
||||||
msg_outtrans_long_len_attr(longstr, (int)strlen(longstr), attr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void msg_outtrans_long_len_attr(const char *longstr, int len, int attr)
|
|
||||||
{
|
{
|
||||||
|
int len = (int)strlen(longstr);
|
||||||
int slen = len;
|
int slen = len;
|
||||||
int room;
|
int room = Columns - msg_col;
|
||||||
|
|
||||||
room = Columns - msg_col;
|
|
||||||
if (len > room && room >= 20) {
|
if (len > room && room >= 20) {
|
||||||
slen = (room - 3) / 2;
|
slen = (room - 3) / 2;
|
||||||
msg_outtrans_len(longstr, slen, attr);
|
msg_outtrans_len(longstr, slen, attr);
|
||||||
|
@ -3179,7 +3179,7 @@ static int spell_read_dic(spellinfo_T *spin, char *fname, afffile_T *affile)
|
|||||||
_("line %6d, word %6ld - %s"),
|
_("line %6d, word %6ld - %s"),
|
||||||
lnum, spin->si_foldwcount + spin->si_keepwcount, w);
|
lnum, spin->si_foldwcount + spin->si_keepwcount, w);
|
||||||
msg_start();
|
msg_start();
|
||||||
msg_outtrans_long_attr(message, 0);
|
msg_outtrans_long(message, 0);
|
||||||
msg_clr_eos();
|
msg_clr_eos();
|
||||||
msg_didout = false;
|
msg_didout = false;
|
||||||
msg_col = 0;
|
msg_col = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user