mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 23:48:32 +00:00
refactor(messages): fold msg_attr into msg
problem: there are too many different functions in message.c solution: fold some of the functions into themselves
This commit is contained in:
@@ -1883,7 +1883,7 @@ static void u_doit(int startcount, bool quiet, bool do_buf_event)
|
||||
curbuf->b_u_curhead = curbuf->b_u_oldhead;
|
||||
beep_flush();
|
||||
if (count == startcount - 1) {
|
||||
msg(_("Already at oldest change"));
|
||||
msg(_("Already at oldest change"), 0);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -1894,7 +1894,7 @@ static void u_doit(int startcount, bool quiet, bool do_buf_event)
|
||||
if (curbuf->b_u_curhead == NULL || get_undolevel(curbuf) <= 0) {
|
||||
beep_flush(); // nothing to redo
|
||||
if (count == startcount - 1) {
|
||||
msg(_("Already at newest change"));
|
||||
msg(_("Already at newest change"), 0);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -2118,9 +2118,9 @@ void undo_time(long step, bool sec, bool file, bool absolute)
|
||||
|
||||
if (closest == closest_start) {
|
||||
if (step < 0) {
|
||||
msg(_("Already at oldest change"));
|
||||
msg(_("Already at oldest change"), 0);
|
||||
} else {
|
||||
msg(_("Already at newest change"));
|
||||
msg(_("Already at newest change"), 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -2719,7 +2719,7 @@ void ex_undolist(exarg_T *eap)
|
||||
}
|
||||
|
||||
if (GA_EMPTY(&ga)) {
|
||||
msg(_("Nothing to undo"));
|
||||
msg(_("Nothing to undo"), 0);
|
||||
} else {
|
||||
sort_strings(ga.ga_data, ga.ga_len);
|
||||
|
||||
|
Reference in New Issue
Block a user