Reply To: Reload currently open file

Product Compare Forums Multi-Edit Support Reload currently open file Reply To: Reload currently open file

Mark Perry


Thanks for pointing me in the right direction. I have written the following macro and added it to the pop menu list. It does the job quite nicely.

void zReloadCurrentFile () Trans2 {
int iSaveRefresh;
int iTempInsert;
int iCWRowPos;
int iRowPos;
int iColPos;
int i;
str sPathFileName;

iSaveRefresh = Refresh;
Refresh = False;
iTempInsert = Insert_Mode;
Insert_Mode = True;
iRowPos = C_Line;
iColPos = C_Col;
iCWRowPos = C_Row;

sPathFileName = GetLongName (File_Name);

rm (“LDFiles /NC=1 /FN=” + sPathFileName);

for (i = 1; i < iCWRowPos; i++) { // Move to original screen posistion

Goto_Line (iRowPos); // Move to original file position
Goto_Col (iColPos);

Insert_Mode = iTempInsert;
Refresh = True;
Refresh = iSaveRefresh;