summaryrefslogtreecommitdiff
path: root/src/fold.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-13 23:38:42 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-13 23:38:42 +0100
commitf9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d (patch)
treea6b07005c19279a4f5d01be14f14861c2657fa95 /src/fold.c
parent05500ece6282407f9f7227aaf564e24147326863 (diff)
downloadvim-git-f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d.tar.gz
patch 8.1.0743: giving error messages is not flexiblev8.1.0743
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.
Diffstat (limited to 'src/fold.c')
-rw-r--r--src/fold.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fold.c b/src/fold.c
index eb344c45b..eba32ece3 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -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);