Closed tommy9 closed 11 months ago
:white_check_mark: Build Rubberduck 2.5.9.6311 completed (commit https://github.com/rubberduck-vba/Rubberduck/commit/957fc299d3 by @tommy9)
Merging #6184 (ce21fbf) into next (9323f70) will increase coverage by
0.24%
. The diff coverage isn/a
.
Fixes #6181
When a selection of code includes a trailing blank line, the GetSelection method cuts this line and sets the end column to the length of the previous line. However, selections are supposed to be one-based, so we want the length plus 1. E.g. if selecting a line which is just
End
, we should see start column = 1, end column = 4 which we do if that is the only line selected but if changing the selection to include an extra blank line, the selection gets modified to have end column = 3.I'm not sure exactly why the last blank line if being pruned but it's not relevant to this issue. Note that only one blank line would be pruned even if there are multiple.