+int ScriptEntry::handle_event()
+{
+ if( ttext && sw_gui->get_button_down() &&
+ sw_gui->get_buttonpress() == 1 &&
+ sw_gui->get_triple_click() ) {
+ int ibeam = get_ibeam_letter(), row = 0;
+ const char *tp = ttext;
+ while( *tp && tp-ttext < ibeam ) {
+ if( *tp++ == '\n' ) ++row;
+ }
+ int pos = sw_gui->script_entry_no;
+ sw_gui->load_selection(pos, row);
+ }
+ return 1;
+}