auto-scroll to last offset
[?]
Jul 5, 2025, 1:26 PM
K5YUSV2WOLGMA75WKQWY2GRLQGPAFGVYTW3GMVTWEECXF4SXFEYACDependencies
- [2]
IQDCHWCPload a pijul repo - [3]
23SFYK4Qbig view refactor into a new crate - [4]
WGID4LS4absolutely slayed testing with iced task - [5]
YKHE3XMWrefactor diffs handling - [6]
XHWLKCLDauto-scroll past skip sections on load - [7]
SASAN2XCuse nav-scrollable - [8]
Z2CJPWZEfocus record message text_editor on spawn - [9]
WT3GA27Padd cursor with selection - [10]
UB2ITZJSrefresh changed files on FS changes - [11]
A5YBC77Vrecord! - [12]
V55EAIWQadd src file LRU cache - [13]
WI2BVQ6Jrm client lib crate - [14]
SWWE2R6Mdisplay basic repo stuff - [15]
4WO3ZJM2show untracked files' contents - [16]
NWJD6VM6mv libflowers libflorescence - [17]
B4RMW5AEadd syntax highlighter to untracked files contents - [18]
BFN2VHZSrefactor file stuff into sub-mod - [19]
6YZAVBWUInitial commit - [20]
FVA36HBVrestart repo manager task if it crashes - [21]
AMPZ2BXKshow changed files diffs (only Edit atm) - [22]
S2NVIFXRallow to enter record msg - [*]
WW36JYLRadd iced_nav_scrollable widget crate
Change contents
- replacement in inflorescence/src/main.rs at line 14
use iced::widget::text_editor;use iced::widget::{scrollable, text_editor}; - replacement in inflorescence/src/main.rs at line 287
app::Msg::Cursor(msg) => cursor::update(&mut state.cursor,&mut state.files,state.repo.as_ref(),msg,).map(|msg| Msg::View(app::Msg::ToRepo(msg))),app::Msg::Cursor(msg) => {let cursor_task = cursor::update(&mut state.cursor,&mut state.files,state.repo.as_ref(),msg,).map(|msg| Msg::View(app::Msg::ToRepo(msg)));// If the selected file's diff is already loaded, scroll back to its// last offsetlet scroll_task = match state.cursor.selection.as_ref() {Some(cursor::Selection::UntrackedFile { ix: _, path }) => {let id = file::Id {path: path.clone(),file_kind: file::Kind::Untracked,};if let Some(nav) = state.files_diffs.get(&id).and_then(|state| state.nav.as_ref()){task::scroll_to(nav.id.clone(),scrollable::AbsoluteOffset {x: 0.0,y: nav.offset,},)} else {Task::none()}}Some(cursor::Selection::ChangedFile { ix: _, path }) => {let id = file::Id {path: path.clone(),file_kind: file::Kind::Changed,};if let Some(nav) = state.files_diffs.get(&id).and_then(|state| state.nav.as_ref()){task::scroll_to(nav.id.clone(),scrollable::AbsoluteOffset {x: 0.0,y: nav.offset,},)} else {Task::none()}}Some(cursor::Selection::LogChange {ix: _,hash,message: _,file: Some(cursor::LogChangeFileSelection { ix: _, path }),}) => {let id = repo::LogFileId {hash: *hash,path: path.clone(),};if let Some(nav) = state.log_diffs.get(&id).and_then(|diff| diff.state.nav.as_ref()){task::scroll_to(nav.id.clone(),scrollable::AbsoluteOffset {x: 0.0,y: nav.offset,},)} else {Task::none()}}Some(cursor::Selection::LogChange {ix: _,hash: _,message: _,file: None,})| None => Task::none(),};Task::batch([cursor_task, scroll_task])} - edit in iced_nav_scrollable/src/lib.rs at line 292
debug_assert!(!nav.skip_sections.contains(&0) || !nav.skip_sections.contains(&1),"Unexpected successive skip sections at ix 0 and 1: {:#?}",nav.skip_sections);