core: fix refresh of item "completion" (bug #38214) (patch from Nils Görs)

The item is now cleared after any action that is changing content of command
line and after switch of buffer.