aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2021-10-18 09:08:46 -0400
committerJames McCoy <jamessan@jamessan.com>2021-11-01 06:41:28 -0400
commitefa924f66b183d9cf2404ce91c4f009c27e0515a (patch)
treeadc8c74cba88e76c2ae0548cd6e9b01804da9933 /src/nvim/mark.c
parent684640f5518a483cf2bc48efc8f68449379cef69 (diff)
downloadrneovim-efa924f66b183d9cf2404ce91c4f009c27e0515a.tar.gz
rneovim-efa924f66b183d9cf2404ce91c4f009c27e0515a.tar.bz2
rneovim-efa924f66b183d9cf2404ce91c4f009c27e0515a.zip
vim-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 vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r--src/nvim/mark.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c
index ea9acdf31a..e351697643 100644
--- a/src/nvim/mark.c
+++ b/src/nvim/mark.c
@@ -564,19 +564,19 @@ static void fmarks_check_one(xfmark_T *fm, char_u *name, buf_T *buf)
int check_mark(pos_T *pos)
{
if (pos == NULL) {
- EMSG(_(e_umark));
+ emsg(_(e_umark));
return FAIL;
}
if (pos->lnum <= 0) {
// lnum is negative if mark is in another file can can't get that
// file, error message already give then.
if (pos->lnum == 0) {
- EMSG(_(e_marknotset));
+ emsg(_(e_marknotset));
}
return FAIL;
}
if (pos->lnum > curbuf->b_ml.ml_line_count) {
- EMSG(_(e_markinval));
+ emsg(_(e_markinval));
return FAIL;
}
return OK;
@@ -713,7 +713,7 @@ static void show_one_mark(int c, char_u *arg, pos_T *p, char_u *name_arg, int cu
if (arg == NULL) {
MSG(_("No marks set"));
} else {
- EMSG2(_("E283: No marks matching \"%s\""), arg);
+ semsg(_("E283: No marks matching \"%s\""), arg);
}
}
} else if (!got_int
@@ -762,9 +762,9 @@ void ex_delmarks(exarg_T *eap)
// clear all marks
clrallmarks(curbuf);
} else if (eap->forceit) {
- EMSG(_(e_invarg));
+ emsg(_(e_invarg));
} else if (*eap->arg == NUL) {
- EMSG(_(e_argreq));
+ emsg(_(e_argreq));
} else {
// clear specified marks only
for (p = eap->arg; *p != NUL; ++p) {
@@ -779,7 +779,7 @@ void ex_delmarks(exarg_T *eap)
: (digit ? ascii_isdigit(p[2])
: ASCII_ISUPPER(p[2])))
|| to < from) {
- EMSG2(_(e_invarg2), p);
+ semsg(_(e_invarg2), p);
return;
}
p += 2;
@@ -821,7 +821,7 @@ void ex_delmarks(exarg_T *eap)
case ' ':
break;
default:
- EMSG2(_(e_invarg2), p);
+ semsg(_(e_invarg2), p);
return;
}
}