structured data editor
git clone https://git.lucas.co/cce-data-editor.git
Forward mouse wheel to json editor and call scroll_to_cursor on tree highlight sync
src/main.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main.rs b/src/main.rs
index 1c64522..268c896 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -470,6 +470,7 @@ impl DataEditorApp {
self.raw_json_editor.select_anchor = Some(start);
self.raw_json_editor.cursor_idx = end;
self.raw_json_editor.sync_editor_state();
+ self.raw_json_editor.scroll_to_cursor();
return;
}
}
@@ -1735,6 +1736,10 @@ impl Application for DataEditorApp {
*needs_rebuild = true;
self.needs_rebuild = true;
}
+ if self.raw_json_editor.mouse_wheel(delta, px, py, &mut self.ui_context) {
+ *needs_rebuild = true;
+ self.needs_rebuild = true;
+ }
}
fn handle_key_input(&mut self, event: &KeyEvent, needs_rebuild: &mut bool) -> Option<Self::Message> {