show untracked file contents in read-only text editor
[?]
Mar 27, 2025, 9:29 AM
BJXUYQ2YQMVULJITT5FEA6NERJVLWFKEAWSBYZVIB7KAT27KOWBACDependencies
- [2]
WT3GA27Padd cursor with selection - [3]
4WO3ZJM2show untracked files' contents - [4]
2VUX5BTDload identity - [5]
YBJRDOTCmake all repo actions async - [6]
D7A7MSIHallow to defer or abandon record, add buttons - [*]
6YZAVBWUInitial commit
Change contents
- replacement in crates/flowers_ui/src/main.rs at line 120
data: Vec<u8>,text_content: text_editor::Content, - edit in crates/flowers_ui/src/main.rs at line 154
UntrackedFileContentsAction(text_editor::Action), - edit in crates/flowers_ui/src/main.rs at line 527
// TODO: use encodinglet text_content = text_editor::Content::with_text(str::from_utf8(&data).unwrap_or("Not UTF-8"),); - replacement in crates/flowers_ui/src/main.rs at line 535
Some(UntrackedFileContents::Loaded { path, data });Some(UntrackedFileContents::Loaded {path,text_content,}); - replacement in crates/flowers_ui/src/main.rs at line 548
Some(UntrackedFileContents::Loaded { path, data });Some(UntrackedFileContents::Loaded {path,text_content,}); - edit in crates/flowers_ui/src/main.rs at line 555
}Task::none()}Message::UntrackedFileContentsAction(action) => {// Read-onlyif !action.is_edit() {if let Some(UntrackedFileContents::Loaded {text_content,..}) = &mut state.untracked_file_contents{text_content.perform(action);} - replacement in crates/flowers_ui/src/main.rs at line 780
data,}) if loaded_path == path =>// TODO: use encoding{el(scrollable(text(str::from_utf8(data).unwrap_or("Not UTF-8"),)).width(Length::Fill))}text_content,}) if loaded_path == path => el(text_editor(text_content).on_action(Message::UntrackedFileContentsAction)), - replacement in crates/flowers_ui/src/main.rs at line 785
el(column([el(text("Diff:")), diff]))el(column([el(text(format!("{path} diff:"))), diff]))