Fix cc crash when cursor is at the beginning of the document
reformatting
close #20