ElyDoc: a hidden navigator reads nothing on each cursor move (D-07)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-10 01:55:39 -04:00
1 parent 0d3d3603c8
commit 1488d615d1
3 files changed
+27 -2

No files matched your search

+2 -1
View File
@@ -80,7 +80,8 @@ impl Docs {
let shown = self
.active_tab()
.map(|tab| (tab.view.clone(), tab.doc.clone()));
let tab = shown.as_ref().map(|(view, doc)| (view, doc));
// Hidden, it follows nothing: no reads on every move.
let tab = shown.as_ref().filter(|_| self.navigating).map(|(view, doc)| (view, doc));
self.navigator
.update(cx, |navigator, cx| navigator.show(tab, cx));
shown.filter(|_| self.navigating)?;