edit: fix the carect filling when the caret is in more then one page

Thanks amsl for reporting the bug.