Correctly check if deletions are within selection.

This commit is contained in:
Paulo Reis 2017-05-02 17:08:41 +01:00
parent 3f441ff38c
commit 722d75f6ef

View file

@ -309,7 +309,7 @@ define [
entry.focused = (entry.offset <= selection_offset_start <= entry.offset + entry.content.length)
$scope.reviewPanel.nSelectedEntries++ if isEntryWithinSelection
else if entry.type == "delete"
isEntryWithinSelection = selection_offset_start <= entry.offset >= selection_offset_start
isEntryWithinSelection = selection_offset_start <= entry.offset <= selection_offset_end
entry.focused = (entry.offset == selection_offset_start)
$scope.reviewPanel.nSelectedEntries++ if isEntryWithinSelection
else if entry.type in [ "add-comment", "bulk-actions" ] and selection