fix getSelectedLines() to only look at direct descendants