TextDocument: keep highlights & markers in sync when reaching max lines