refactor(messages): fold msg_outtrans_attr into msg_outtrans

problem: there are too many different functions in message.c
solution: fold some of the functions into themselves
This commit is contained in:
bfredl
2023-09-27 21:46:39 +02:00
parent 26d6f03023
commit f91cd31d7d
26 changed files with 91 additions and 108 deletions

View File

@@ -1263,7 +1263,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char *pat, int count, in
memset(msgbuf + pat_len, ' ', (size_t)(r - msgbuf));
}
}
msg_outtrans(msgbuf);
msg_outtrans(msgbuf, 0);
msg_clr_eos();
msg_check();
@@ -3709,7 +3709,7 @@ void find_pattern_in_path(char *ptr, Direction dir, size_t len, bool whole, bool
if (new_fname != NULL) {
// using "new_fname" is more reliable, e.g., when
// 'includeexpr' is set.
msg_outtrans_attr(new_fname, HL_ATTR(HLF_D));
msg_outtrans(new_fname, HL_ATTR(HLF_D));
} else {
// Isolate the file name.
// Include the surrounding "" or <> if present.
@@ -3743,7 +3743,7 @@ void find_pattern_in_path(char *ptr, Direction dir, size_t len, bool whole, bool
}
save_char = p[i];
p[i] = NUL;
msg_outtrans_attr(p, HL_ATTR(HLF_D));
msg_outtrans(p, HL_ATTR(HLF_D));
p[i] = save_char;
}