forked from aniani/vim
patch 8.2.3986: error messages are spread out
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
This commit is contained in:
10
src/fold.c
10
src/fold.c
@@ -65,8 +65,6 @@ static void foldDelMarker(linenr_T lnum, char_u *marker, int markerlen);
|
||||
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 @@ opFoldRange(
|
||||
(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 @@ deleteFold(
|
||||
}
|
||||
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 @@ 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_no_fold_found));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1387,7 +1385,7 @@ setManualFoldWin(
|
||||
done |= DONE_FOLD;
|
||||
}
|
||||
else if (donep == NULL && wp == curwin)
|
||||
emsg(_(e_nofold));
|
||||
emsg(_(e_no_fold_found));
|
||||
|
||||
if (donep != NULL)
|
||||
*donep |= done;
|
||||
|
Reference in New Issue
Block a user