pub fn edit_note(mut n: usize) {
    if n == 0 {
        let last_edit = g_get_last_edit();
        let suggestion = if last_edit == 0 {
            s!()
        } else {
            expand_note_number(last_edit)
        };
        n = parse_note_ans(&ask_string("Edit #", &(suggestion), true));
    }

    if !check_line_exists(n) {
        return;
    }
    let edited = ask_string("Edit Note", &get_line(n), false);
    if edited.is_empty() {
        return;
    }
    g_set_last_edit(n);
    replace_line(n, edited);
    show_page(get_note_page(n));
}
// Asks for a note number to edit
// The note is then showed and editable
Asks for a note number to edit
The note is then showed and editable
Asks for a note number to edit The note is then showed and editable
pub fn edit_note(mut n: usize) {
    if n == 0 {
        let last_edit = g_get_last_edit();
        let suggestion = if last_edit == 0 {
            s!()
        } else {
            expand_note_number(last_edit)
        };
        n = parse_note_ans(&ask_string("Edit #", &(suggestion), true));
    }
    if !check_line_exists(n) {
        return;
    }
    let edited = ask_string("Edit Note", &get_line(n), false);
    if edited.is_empty() {
        return;
    }
    g_set_last_edit(n);
    replace_line(n, edited);
    show_page(get_note_page(n));
}
pub fn edit_note ( mut n : usize ) { if n == 0 { let last_edit = g_get_last_edit ( ) ; let suggestion = if last_edit == 0 { s ! ( ) } else { expand_note_number ( last_edit ) } ; n = parse_note_ans ( & ask_string ( " " , & ( suggestion ) , true ) ) ; } if ! check_line_exists ( n ) { return ; } let edited = ask_string ( " " , & get_line ( n ) , false ) ; if edited . is_empty ( ) { return ; } g_set_last_edit ( n ) ; replace_line ( n , edited ) ; show_page ( get_note_page ( n ) ) ; }
Asks for a note number to edit
The note is then showed and editable
Asks for a note number to edit The note is then showed and editable
n
usize