Re: edx :: adding Backup, Restore, and purge to the top-line menu

new topic     » goto parent     » topic index » view thread      » older message » newer message
-- modified "mods" routine: If the current file is a 
-- backup file with one or more "~" appended to the file_name, 
-- this routine will compare the current file with the base 
-- file which is the file which would be overwritten, with 
-- the restore command, "ESCAPE & "R". For example, if the 
-- current file is "edx.ex~~", this routine will execute: 
-- shell(compare_cmd edx.ex edx.ex~~ | more) 
-- If the current file does not have a "~" in the extension, 
-- it will perform as before. 
elsif command[1] = 'm' then 
    save_file(TEMPFILE) 
        if stop then 
            stop = FALSE 
            if match("~", file_name) then 
               -- show differences between original source file and the current file, if  
               -- current file is a backup file with one or more "~" appended to the extension 
               command = compare_cmd & file_name[1..match("~", file_name)-1] 
           else 
               -- show differences between the current file buffer and file on disk 
               command = compare_cmd & file_name     
           end if 
        shell(command & " " & TEMPFILE & " | more") 
        normal_video() 
        goto_line(0, b_col) 
        editbuff = TRUE 
        end if 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu