Skip to content

Commit

Permalink
fix stopline in formatting (#1228)
Browse files Browse the repository at this point in the history
  • Loading branch information
xgdgsc authored Jul 20, 2023
1 parent 198e07e commit 08170e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/requests/features.jl
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ function textDocument_range_formatting_request(params::DocumentRangeFormattingPa

# Insert start and stop line comments as markers in the original text
original_lines = collect(eachline(IOBuffer(oldcontent); keep=true))
stopline = min(stopline, length(original_lines))
original_block = join(@view(original_lines[startline:stopline]))
# If the stopline do not have a trailing newline we need to add that before our stop
# comment marker. This is removed after formatting.
Expand Down

0 comments on commit 08170e4

Please sign in to comment.