Essentially adding the parts before the highlighted area on the line where the higlighted area starts to the styled expression. Also, after the styled expression, the remainder of that line that was not styled is added.

complete_styled_expr(context, styled_expr, neighbourhood)

Arguments

context

The context from find_active_context().

styled_expr

Character vector consisting of the styled expression.

neighbourhood

Neighbourhood obtained from extract_neighbourhood().