aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/cmdexpand.c2
-rw-r--r--src/nvim/message.c12
-rw-r--r--src/nvim/spellfile.c2
3 files changed, 5 insertions, 11 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index 290cc336b8..bcb893022a 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -976,7 +976,7 @@ static void showmatches_oneline(expand_T *xp, char **matches, int numMatches, in
msg_advance(maxlen + 1);
msg_puts(p);
msg_advance(maxlen + 3);
- msg_outtrans_long_attr(p + 2, HL_ATTR(HLF_D));
+ msg_outtrans_long(p + 2, HL_ATTR(HLF_D));
break;
}
for (int i = maxlen - lastlen; --i >= 0;) {
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 63d1b44d67..18eb049d70 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -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
/// part in the middle and replace it with "..." when necessary.
/// Does not handle multi-byte characters!
-void msg_outtrans_long_attr(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)
+void msg_outtrans_long(const char *longstr, int attr)
{
+ int len = (int)strlen(longstr);
int slen = len;
- int room;
-
- room = Columns - msg_col;
+ int room = Columns - msg_col;
if (len > room && room >= 20) {
slen = (room - 3) / 2;
msg_outtrans_len(longstr, slen, attr);
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c
index 379342df03..1d93fe4cff 100644
--- a/src/nvim/spellfile.c
+++ b/src/nvim/spellfile.c
@@ -3179,7 +3179,7 @@ static int spell_read_dic(spellinfo_T *spin, char *fname, afffile_T *affile)
_("line %6d, word %6ld - %s"),
lnum, spin->si_foldwcount + spin->si_keepwcount, w);
msg_start();
- msg_outtrans_long_attr(message, 0);
+ msg_outtrans_long(message, 0);
msg_clr_eos();
msg_didout = false;
msg_col = 0;