[PATCH v3 3/7] kdb: Fix console handling when editing and tab-completing commands