Skip to content

Conversation

joaopsazevedo
Copy link
Contributor

If the user selects from the procedure name Main to the procedure end label Main, the whole file needs to be formatted. This PR fixes an exception that was being raised when converting from Source_Location_Range to Span.

procedure Main is begin declare A : Integer; begin null; end; end Main;
Check if Segment.Start_Line or Segment.End_Line are the last line of the Document. If so, adjust the last character iterator accordingly.
@joaopsazevedo joaopsazevedo changed the title Fix exception raised when range formatting the whole document UB30-006 Fix exception raised when range formatting the whole document Jul 14, 2022
@joaopsazevedo joaopsazevedo requested a review from reznikmm July 14, 2022 10:49
@joaopsazevedo joaopsazevedo merged commit fda1058 into master Jul 15, 2022
@joaopsazevedo joaopsazevedo deleted the topic/UB30-006_range_format_whole_document branch July 15, 2022 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants