0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.1.0743: giving error messages is not flexible

Problem:    Giving error messages is not flexible.
Solution:   Add semsg().  Change argument from "char_u *" to "char *", also
            for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
            #3302)  Also make emsg() accept a "char *" argument.  Get rid of
            an enormous number of type casts.
This commit is contained in:
Bram Moolenaar
2019-01-13 23:38:42 +01:00
parent 05500ece62
commit f9e3e09fdc
95 changed files with 1963 additions and 2018 deletions

View File

@@ -410,7 +410,7 @@ opFoldRange(
(void)hasFolding(lnum, NULL, &lnum_next);
}
if (done == DONE_NOTHING)
EMSG(_(e_nofold));
emsg(_(e_nofold));
/* Force a redraw to remove the Visual highlighting. */
if (had_visual)
redraw_curbuf_later(INVERTED);
@@ -561,9 +561,9 @@ foldManualAllowed(int create)
if (foldmethodIsManual(curwin) || foldmethodIsMarker(curwin))
return TRUE;
if (create)
EMSG(_("E350: Cannot create fold with current 'foldmethod'"));
emsg(_("E350: Cannot create fold with current 'foldmethod'"));
else
EMSG(_("E351: Cannot delete fold with current 'foldmethod'"));
emsg(_("E351: Cannot delete fold with current 'foldmethod'"));
return FALSE;
}
@@ -775,7 +775,7 @@ deleteFold(
}
if (!did_one)
{
EMSG(_(e_nofold));
emsg(_(e_nofold));
/* Force a redraw to remove the Visual highlighting. */
if (had_visual)
redraw_curbuf_later(INVERTED);
@@ -1211,7 +1211,7 @@ setFoldRepeat(linenr_T lnum, long count, int do_open)
{
/* Only give an error message when no fold could be opened. */
if (n == 0 && !(done & DONE_FOLD))
EMSG(_(e_nofold));
emsg(_(e_nofold));
break;
}
}
@@ -1363,7 +1363,7 @@ setManualFoldWin(
done |= DONE_FOLD;
}
else if (donep == NULL && wp == curwin)
EMSG(_(e_nofold));
emsg(_(e_nofold));
if (donep != NULL)
*donep |= done;
@@ -1735,7 +1735,7 @@ foldCreateMarkers(linenr_T start, linenr_T end)
{
if (!curbuf->b_p_ma)
{
EMSG(_(e_modifiable));
emsg(_(e_modifiable));
return;
}
parseMarker(curwin);