// // JSMARKER.VDM Christian Ziemski 28.05.1999 // 15.08.2000 f. 5.20 DI1 // // // Displays the used Text Markers with line number and text example. // // Input of a marker number // - sets that marker to the current cursor position // or // - jumps to that marker and stays in the dialog // or // - jumps to that marker and exits the dialog // // - clears that marker // // // (For the Windows version of VEDIT only!) // // // Usage: {Misc, Load/Execute Macro} // or easier: // Put an entry with this macro as one long line in the user or tools menu. // // Build the list of used markers Out_Reg(103) M(" No. Line Text\n-------------------------------------------------------------------------------------\n") for(#103=0;#103<10;#103++){ if(Marker(#103)!=-1){ NT(#103,NOCR) // marker no. M(" : ") Save_Pos() GP(Marker(#103)) NT(Cur_Line(),FILL+NOCR) // cursor line of marker position M(" : ") #104=EoL_Pos Restore_Pos() if((Marker(#103)+30)<#104){ // text example max. to EoL #104=Marker(#103)+30 } Type_Block(Marker(#103),#104) Type_Newline() } } Out_Reg(CLEAR) // Show the Input Dialog Reg_Empty(104) while(ALL){ // until break via button #105=DI1(104,"'Show used/Jump to/Set/Clear Text Marker','Marker no.','??|@(103)','[Jump+E&xit]','[&Jump]','[&Set]','[&Clear]'",@104,SCREEN+CENTER,0,0) #104=Buf_Num #103=Buf_Free(EXTRA) if(#103==-1){ // no more extra buffer? Alert() BS(#104) break } if(#105==0 || Reg_Size(104)==0){ // ESC or no user input? break } BS(#103) RI(104,BEGIN) #103=Num_Eval() // evaluate marker no. BQ(OK) BS(#104) if(Chars_Matched>0){ // numeric input? if(#103>=0 && #103<10){ // valid? if(#105==3){ Set_Marker(#103, Cur_Pos) break } if(#105==4){ Set_Marker(#103, -1) break }else{ Goto_Pos(Marker(#103)) Update if(#105==1){ break } } } } }