mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
PVS/V547: Expression is always true
Since 67bac681ea
(see msg_multiline_attr()) msg_clr_eos() is always
called.
This commit is contained in:
parent
a52e93dfd8
commit
fe299a82a6
@ -19811,16 +19811,15 @@ void ex_echo(exarg_T *eap)
|
|||||||
{
|
{
|
||||||
char_u *arg = eap->arg;
|
char_u *arg = eap->arg;
|
||||||
typval_T rettv;
|
typval_T rettv;
|
||||||
bool needclr = true;
|
|
||||||
bool atstart = true;
|
bool atstart = true;
|
||||||
const int did_emsg_before = did_emsg;
|
const int did_emsg_before = did_emsg;
|
||||||
|
|
||||||
if (eap->skip)
|
if (eap->skip)
|
||||||
++emsg_skip;
|
++emsg_skip;
|
||||||
while (*arg != NUL && *arg != '|' && *arg != '\n' && !got_int) {
|
while (*arg != NUL && *arg != '|' && *arg != '\n' && !got_int) {
|
||||||
/* If eval1() causes an error message the text from the command may
|
// If eval1() causes an error message the text from the command may
|
||||||
* still need to be cleared. E.g., "echo 22,44". */
|
// still need to be cleared. E.g., "echo 22,44".
|
||||||
need_clr_eos = needclr;
|
need_clr_eos = true;
|
||||||
|
|
||||||
{
|
{
|
||||||
char_u *p = arg;
|
char_u *p = arg;
|
||||||
@ -19867,11 +19866,11 @@ void ex_echo(exarg_T *eap)
|
|||||||
if (eap->skip)
|
if (eap->skip)
|
||||||
--emsg_skip;
|
--emsg_skip;
|
||||||
else {
|
else {
|
||||||
/* remove text that may still be there from the command */
|
// remove text that may still be there from the command
|
||||||
if (needclr)
|
msg_clr_eos();
|
||||||
msg_clr_eos();
|
if (eap->cmdidx == CMD_echo) {
|
||||||
if (eap->cmdidx == CMD_echo)
|
|
||||||
msg_end();
|
msg_end();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user