track selected file path together with an index
[?]
Feb 10, 2025, 3:40 PM
DVKSPF7R5QBWRHNADU7LK37OVZHOHNDSRETUVY6GNXWE74SHXSUACDependencies
- [2]
6YZAVBWUInitial commit - [3]
IQDCHWCPload a pijul repo - [4]
WT3GA27Padd cursor with selection - [5]
3GZPRZXCs/-/_ in crate paths - [6]
SWWE2R6Mdisplay basic repo stuff
Change contents
- replacement in crates/libflowers_client/src/cursor.rs at line 9
File(usize),File { ix: usize, path: String }, - edit in crates/flowers_ui/src/main.rs at line 1
use std::io::Cursor; - edit in crates/flowers_ui/src/main.rs at line 42
let changed_file_path =|ix| state.repo.changed_files.iter().nth(ix).unwrap().clone(); - replacement in crates/flowers_ui/src/main.rs at line 52
cursor::Selection::File(0)let ix = 0;let path = changed_file_path(ix);cursor::Selection::File { ix, path } - replacement in crates/flowers_ui/src/main.rs at line 57
Some(cursor::Selection::File(ix)) => {Some(cursor::Selection::File { ix, path: _ }) => { - replacement in crates/flowers_ui/src/main.rs at line 63
cursor::Selection::File(ix + 1)let ix = ix + 1;let path = changed_file_path(ix);cursor::Selection::File { ix, path } - replacement in crates/flowers_ui/src/main.rs at line 78
cursor::Selection::File(state.repo.changed_files.len() - 1,)let ix = state.repo.changed_files.len() - 1;let path = changed_file_path(ix);cursor::Selection::File { ix, path } - replacement in crates/flowers_ui/src/main.rs at line 83
Some(cursor::Selection::File(ix)) => {Some(cursor::Selection::File { ix, path: _ }) => { - replacement in crates/flowers_ui/src/main.rs at line 87
cursor::Selection::File(ix - 1)let ix = *ix - 1;let path = changed_file_path(ix);cursor::Selection::File { ix, path } - replacement in crates/flowers_ui/src/main.rs at line 140
Some(cursor::Selection::File(selected_ix)) if &ix == selected_ixSome(cursor::Selection::File{ix: selected_ix, path:_}) if &ix == selected_ix - replacement in crates/flowers_ui/src/main.rs at line 145
cursor::Selection::File(ix),cursor::Selection::File{ix, path: path.clone()},