refactor: replace char_u variables and functions with char

Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
Dundar Goc
2022-05-09 11:49:32 +02:00
parent 7adecbcd29
commit f0148de790
65 changed files with 617 additions and 661 deletions

View File

@@ -598,8 +598,8 @@ void msg_source(int attr)
/// If "emsg_skip" is set: never do error messages.
int emsg_not_now(void)
{
if ((emsg_off > 0 && vim_strchr(p_debug, 'm') == NULL
&& vim_strchr(p_debug, 't') == NULL)
if ((emsg_off > 0 && vim_strchr((char *)p_debug, 'm') == NULL
&& vim_strchr((char *)p_debug, 't') == NULL)
|| emsg_skip > 0) {
return TRUE;
}
@@ -623,14 +623,12 @@ static bool emsg_multiline(const char *s, bool multiline)
bool severe = emsg_severe;
emsg_severe = false;
if (!emsg_off || vim_strchr(p_debug, 't') != NULL) {
/*
* Cause a throw of an error exception if appropriate. Don't display
* the error message in this case. (If no matching catch clause will
* be found, the message will be displayed later on.) "ignore" is set
* when the message should be ignored completely (used for the
* interrupt message).
*/
if (!emsg_off || vim_strchr((char *)p_debug, 't') != NULL) {
// Cause a throw of an error exception if appropriate. Don't display
// the error message in this case. (If no matching catch clause will
// be found, the message will be displayed later on.) "ignore" is set
// when the message should be ignored completely (used for the
// interrupt message).
if (cause_errthrow(s, severe, &ignore)) {
if (!ignore) {
did_emsg++;
@@ -1212,7 +1210,7 @@ void wait_return(int redraw)
if (c == K_LEFTMOUSE || c == K_MIDDLEMOUSE || c == K_RIGHTMOUSE
|| c == K_X1MOUSE || c == K_X2MOUSE) {
(void)jump_to_mouse(MOUSE_SETPOS, NULL, 0);
} else if (vim_strchr((char_u *)"\r\n ", c) == NULL && c != Ctrl_C) {
} else if (vim_strchr("\r\n ", c) == NULL && c != Ctrl_C) {
// Put the character back in the typeahead buffer. Don't use the
// stuff buffer, because lmaps wouldn't work.
ins_char_typebuf(vgetc_char, vgetc_mod_mask);