fixed bug with stopping editor text input before reaching the last line