while (&pce::document::select_next != $first_doc) { next if $answer == wxCANCEL; &pce::edit::_save_positions; $answer = &sniff_selection(0, $sci_frame->GetTextLength); &pce::edit::_restore_positions; }