Fix editor empty-line bug and refine tool window.