mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
lint
This commit is contained in:
parent
b2a11515b2
commit
3c3b7844b9
@ -13558,9 +13558,8 @@ static void f_readfile(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
|
||||
static void return_register(int regname, typval_T *rettv)
|
||||
{
|
||||
char_u buf[2] = {0, 0};
|
||||
char_u buf[2] = { regname, 0 };
|
||||
|
||||
buf[0] = (char_u)regname;
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = vim_strsave(buf);
|
||||
}
|
||||
|
@ -1234,7 +1234,6 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
||||
int did_sandbox = FALSE;
|
||||
cmdmod_T save_cmdmod;
|
||||
const int save_reg_executing = reg_executing;
|
||||
int ni; /* set when Not Implemented */
|
||||
char_u *cmd;
|
||||
int address_count = 1;
|
||||
|
||||
@ -1763,10 +1762,10 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
||||
goto doend;
|
||||
}
|
||||
|
||||
ni = (!IS_USER_CMDIDX(ea.cmdidx)
|
||||
// set when Not Implemented
|
||||
const int ni = !IS_USER_CMDIDX(ea.cmdidx)
|
||||
&& (cmdnames[ea.cmdidx].cmd_func == ex_ni
|
||||
|| cmdnames[ea.cmdidx].cmd_func == ex_script_ni
|
||||
));
|
||||
|| cmdnames[ea.cmdidx].cmd_func == ex_script_ni);
|
||||
|
||||
|
||||
// Forced commands.
|
||||
|
@ -1666,8 +1666,9 @@ static int vgetorpeek(int advance)
|
||||
|
||||
init_typebuf();
|
||||
start_stuff();
|
||||
if (advance && typebuf.tb_maplen == 0)
|
||||
if (advance && typebuf.tb_maplen == 0) {
|
||||
reg_executing = 0;
|
||||
}
|
||||
do {
|
||||
/*
|
||||
* get a character: 1. from the stuffbuffer
|
||||
|
@ -541,9 +541,8 @@ static bool normal_need_additional_char(NormalState *s)
|
||||
int flags = nv_cmds[s->idx].cmd_flags;
|
||||
bool pending_op = s->oa.op_type != OP_NOP;
|
||||
int cmdchar = s->ca.cmdchar;
|
||||
return
|
||||
// without NV_NCH we never need to check for an additional char
|
||||
flags & NV_NCH && (
|
||||
return flags & NV_NCH && (
|
||||
// NV_NCH_NOP is set and no operator is pending, get a second char
|
||||
((flags & NV_NCH_NOP) == NV_NCH_NOP && !pending_op)
|
||||
// NV_NCH_ALW is set, always get a second char
|
||||
|
@ -6410,14 +6410,11 @@ int showmode(void)
|
||||
&& ((State & TERM_FOCUS)
|
||||
|| (State & INSERT)
|
||||
|| restart_edit
|
||||
|| VIsual_active
|
||||
));
|
||||
|| VIsual_active));
|
||||
if (do_mode || reg_recording != 0) {
|
||||
/*
|
||||
* Don't show mode right now, when not redrawing or inside a mapping.
|
||||
* Call char_avail() only when we are going to show something, because
|
||||
* it takes a bit of time.
|
||||
*/
|
||||
// Don't show mode right now, when not redrawing or inside a mapping.
|
||||
// Call char_avail() only when we are going to show something, because
|
||||
// it takes a bit of time.
|
||||
if (!redrawing() || (char_avail() && !KeyTyped) || msg_silent != 0) {
|
||||
redraw_cmdline = TRUE; /* show mode later */
|
||||
return 0;
|
||||
@ -6534,7 +6531,7 @@ int showmode(void)
|
||||
need_clear = TRUE;
|
||||
}
|
||||
if (reg_recording != 0
|
||||
&& edit_submode == NULL /* otherwise it gets too long */
|
||||
&& edit_submode == NULL // otherwise it gets too long
|
||||
) {
|
||||
recording_mode(attr);
|
||||
need_clear = true;
|
||||
|
Loading…
Reference in New Issue
Block a user