Use function instead of key sequence for search_with_selected_text