* contents, thus no screen update is needed. */
if (!term->tl_normal_mode)
{
- /* TODO: only update once in a while. */
+ // Don't use update_screen() when editing the command line, it gets
+ // cleared.
+ // TODO: only update once in a while.
ch_log(term->tl_job->jv_channel, "updating screen");
- if (buffer == curbuf)
+ if (buffer == curbuf && (State & CMDLINE) == 0)
{
- update_screen(0);
+ update_screen(VALID_NO_UPDATE);
/* update_screen() can be slow, check the terminal wasn't closed
* already */
if (buffer == curbuf && curbuf->b_term != NULL)