From 9cec6d8d651bbbf5825ccd0bb0099d3a6b0c0160 Mon Sep 17 00:00:00 2001 From: Keith Simmons Date: Wed, 13 Apr 2022 13:30:03 -0700 Subject: [PATCH] add comment explaining offsets --- crates/editor/src/editor.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 73674362c6b260cd8b1e431ca36a3445dfa996f9..c67a9c233fd06428426dc210c368da443dd48133 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -848,6 +848,8 @@ struct ClipboardSelection { } pub struct NavigationData { + // Matching offsets for anchor and scroll_top_anchor allows us to recreate the anchor if the buffer + // has since been closed anchor: Anchor, offset: usize, scroll_position: Vector2F,