patch 8.2.3986: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
diff --git a/src/fold.c b/src/fold.c
index f8331be..5011887 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -65,8 +65,6 @@
static void foldUpdateIEMS(win_T *wp, linenr_T top, linenr_T bot);
static void parseMarker(win_T *wp);
-static char *e_nofold = N_("E490: No fold found");
-
/*
* While updating the folds lines between invalid_top and invalid_bot have an
* undefined fold level. Only used for the window currently being updated.
@@ -412,7 +410,7 @@
(void)hasFolding(lnum, NULL, &lnum_next);
}
if (done == DONE_NOTHING)
- emsg(_(e_nofold));
+ emsg(_(e_no_fold_found));
// Force a redraw to remove the Visual highlighting.
if (had_visual)
redraw_curbuf_later(INVERTED);
@@ -785,7 +783,7 @@
}
if (!did_one)
{
- emsg(_(e_nofold));
+ emsg(_(e_no_fold_found));
// Force a redraw to remove the Visual highlighting.
if (had_visual)
redraw_curbuf_later(INVERTED);
@@ -1235,7 +1233,7 @@
{
// Only give an error message when no fold could be opened.
if (n == 0 && !(done & DONE_FOLD))
- emsg(_(e_nofold));
+ emsg(_(e_no_fold_found));
break;
}
}
@@ -1387,7 +1385,7 @@
done |= DONE_FOLD;
}
else if (donep == NULL && wp == curwin)
- emsg(_(e_nofold));
+ emsg(_(e_no_fold_found));
if (donep != NULL)
*donep |= done;