editor: improve intersection routine