jump to new editor scroll
fix
@@ -1584,19 +1584,7 @@ fn lifecycle(
find.lifecycle(ctx, event, data, env);
}
- match event {
- LifeCycle::WidgetAdded => {
- let editor = data.main_split.editors.get(&self.view_id).unwrap();
- ctx.submit_command(Command::new(
- LAPCE_UI_COMMAND,
- LapceUICommand::ForceScrollTo(
- editor.scroll_offset.x,
- editor.scroll_offset.y,
- ),
- Target::Widget(editor.view_id),
- ));
- }
- LifeCycle::HotChanged(is_hot) => {
+ if let LifeCycle::HotChanged(is_hot) = event {
self.header.widget_mut().view_is_hot = *is_hot;
let editor = data.main_split.editors.get(&self.view_id).unwrap();
if let Some(editor_tab_id) = editor.tab_id.as_ref() {
@@ -1606,8 +1594,6 @@ fn lifecycle(
}
ctx.request_layout();
}
- _ => (),
- }
self.header.lifecycle(ctx, event, data, env);
self.editor.lifecycle(ctx, event, data, env);
}
