pub fn undo_last_edit() {
    let notes = g_get_notes();
    let prev_notes = g_get_prev_notes();

    if prev_notes == notes {
        return show_message("< Nothing To Undo >");
    }

    p!("This will undo notes to the previous state.");
    p!("Multiple undos in a row can't be performed.");

    if ask_bool("Undo?", true) {
        update_file(prev_notes);
        refresh_page();
    }
}
// Restores the file
// to the previous state
Restores the file
to the previous state
Restores the file to the previous state
pub fn undo_last_edit() {
    let notes = g_get_notes();
    let prev_notes = g_get_prev_notes();
    if prev_notes == notes {
        return show_message("< Nothing To Undo >");
    }
    p!("This will undo notes to the previous state.");
    p!("Multiple undos in a row can't be performed.");
    if ask_bool("Undo?", true) {
        update_file(prev_notes);
        refresh_page();
    }
}
pub fn undo_last_edit ( ) { let notes = g_get_notes ( ) ; let prev_notes = g_get_prev_notes ( ) ; if prev_notes == notes { return show_message ( " " ) ; } p ! ( " " ) ; p ! ( " " ) ; if ask_bool ( " " , true ) { update_file ( prev_notes ) ; refresh_page ( ) ; } }
Restores the file
to the previous state
Restores the file to the previous state