Fix #1427 Fixed text mode auto-indent