handle automatic indent when editing lists
minor bug fixing
