1.fix the edit bug when edit is empty,the insert line function is not wo...

1.fix the edit bug when edit is empty,the insert line function is notworking.
2.fix the caret bug for delete line.
3.fix the bug for delete the last line.