aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/digraph.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/digraph.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/digraph.c')
-rw-r--r--src/nvim/digraph.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c
index 0fa6ebcd94..d1dd9b8309 100644
--- a/src/nvim/digraph.c
+++ b/src/nvim/digraph.c
@@ -1628,18 +1628,18 @@ void putdigraph(char_u *str)
char2 = *str++;
if (char2 == 0) {
- EMSG(_(e_invarg));
+ emsg(_(e_invarg));
return;
}
if ((char1 == ESC) || (char2 == ESC)) {
- EMSG(_("E104: Escape not allowed in digraph"));
+ emsg(_("E104: Escape not allowed in digraph"));
return;
}
str = skipwhite(str);
if (!ascii_isdigit(*str)) {
- EMSG(_(e_number_exp));
+ emsg(_(e_number_exp));
return;
}
int n = getdigits_int(&str, true, 0);
@@ -1821,7 +1821,7 @@ typedef struct {
/// @return NULL if OK, an error message for failure. This only needs to be
/// used when setting the option, not later when the value has already
/// been checked.
-char_u *keymap_init(void)
+char *keymap_init(void)
{
curbuf->b_kmap_state &= ~KEYMAP_INIT;
@@ -1850,7 +1850,7 @@ char_u *keymap_init(void)
if (source_runtime(buf, 0) == FAIL) {
xfree(buf);
- return (char_u *)N_("E544: Keymap file not found");
+ return N_("E544: Keymap file not found");
}
}
xfree(buf);
@@ -1873,7 +1873,7 @@ void ex_loadkeymap(exarg_T *eap)
char_u *save_cpo = p_cpo;
if (!getline_equal(eap->getline, eap->cookie, getsourceline)) {
- EMSG(_("E105: Using :loadkeymap not in a sourced file"));
+ emsg(_("E105: Using :loadkeymap not in a sourced file"));
return;
}
@@ -1908,7 +1908,7 @@ void ex_loadkeymap(exarg_T *eap)
|| (*kp->from == NUL)
|| (*kp->to == NUL)) {
if (*kp->to == NUL) {
- EMSG(_("E791: Empty keymap entry"));
+ emsg(_("E791: Empty keymap entry"));
}
xfree(kp->from);
xfree(kp->to);