// only enable if mouse activity is inside line range
int activityLine= getLastLine();
if (activityLine == -1 || activityLine < fStartLine || activityLine > fEndLine + 1)
// + 1 to cover the case where the selection goes to the offset of the next line
return false;
ILineDiffer differ= getDiffer();
if (differ == null)
return false;
// only enable if selection covers at least two lines
if (fEndLine > fStartLine) {
for (int i= fStartLine; i <= fEndLine; i++) {
ILineDiffInfo info= differ.getLineInfo(i);
if (info != null && info.hasChanges()) {
return true;
}
}
}