diff options
author | James McCoy <jamessan@jamessan.com> | 2021-10-18 09:08:46 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2021-11-01 06:41:28 -0400 |
commit | efa924f66b183d9cf2404ce91c4f009c27e0515a (patch) | |
tree | adc8c74cba88e76c2ae0548cd6e9b01804da9933 /src/nvim/debugger.c | |
parent | 684640f5518a483cf2bc48efc8f68449379cef69 (diff) | |
download | rneovim-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/debugger.c')
-rw-r--r-- | src/nvim/debugger.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/debugger.c b/src/nvim/debugger.c index aeaf2555b1..9657e903d1 100644 --- a/src/nvim/debugger.c +++ b/src/nvim/debugger.c @@ -496,7 +496,7 @@ static int dbg_parsearg(char_u *arg, garray_T *gap) bp->dbg_type = DBG_FILE; } else if (gap != &prof_ga && STRNCMP(p, "here", 4) == 0) { if (curbuf->b_ffname == NULL) { - EMSG(_(e_noname)); + emsg(_(e_noname)); return FAIL; } bp->dbg_type = DBG_FILE; @@ -504,7 +504,7 @@ static int dbg_parsearg(char_u *arg, garray_T *gap) } else if (gap != &prof_ga && STRNCMP(p, "expr", 4) == 0) { bp->dbg_type = DBG_EXPR; } else { - EMSG2(_(e_invarg2), p); + semsg(_(e_invarg2), p); return FAIL; } p = skipwhite(p + 4); @@ -523,7 +523,7 @@ static int dbg_parsearg(char_u *arg, garray_T *gap) if ((!here && *p == NUL) || (here && *p != NUL) || (bp->dbg_type == DBG_FUNC && strstr((char *)p, "()") != NULL)) { - EMSG2(_(e_invarg2), arg); + semsg(_(e_invarg2), arg); return FAIL; } @@ -661,7 +661,7 @@ void ex_breakdel(exarg_T *eap) } if (todel < 0) { - EMSG2(_("E161: Breakpoint not found: %s"), eap->arg); + semsg(_("E161: Breakpoint not found: %s"), eap->arg); } else { while (!GA_EMPTY(gap)) { xfree(DEBUGGY(gap, todel).dbg_name); |