Fix ctrl+a and ctrl+e behavior when has mark.