What your now saying doesnt matter, the code i gave FORCES the window to have only one selected line.
But yes if u had more than one highlighted, then you would need a loop, and to use $sline(@window,N) [ contents ] and $sline(@window,N).ln [ line number ], be aware that if your choice is to delete this line, then the N value does not need to be incremented to the next line, since this line well be deleted then the next line well become line N, the N value only needs to be incremented if the choice is to NOT delete the line.If u instead opted for a one off question of do u want to delete all the selected lines, Yes, then ytou can simply //dline @window $sline(@window,1).ln repeatedly, untill $sline(@window,1).ln becomes $false.