diff options
author | Canop <cano.petrole@gmail.com> | 2020-07-17 09:51:08 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-07-17 09:51:08 +0200 |
commit | f3c798fcd0f075175aba98f1430db6c23009e268 (patch) | |
tree | 541f8ff8ffceb8f1ec4de22c50f4d1bf7ff39869 /src/browser/browser_state.rs | |
parent | f91b02bf095b613587f7db28f075595afde38cf5 (diff) |
fix a few problems with searching when root isn't trimmed
Those problems are made obvious by a recent change making root trimming
not the default anymore
Diffstat (limited to 'src/browser/browser_state.rs')
-rw-r--r-- | src/browser/browser_state.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/browser/browser_state.rs b/src/browser/browser_state.rs index 6c54df8..052585d 100644 --- a/src/browser/browser_state.rs +++ b/src/browser/browser_state.rs @@ -668,8 +668,8 @@ impl AppState for BrowserState { let mut options = self.tree.options.clone(); options.pattern = self.pending_pattern.take(); let root = self.tree.root().clone(); - let len = self.tree.lines.len() as u16; - let builder = match TreeBuilder::from(root, options, len as usize, con) { + let page_height = BrowserState::page_height(screen) as usize; + let builder = match TreeBuilder::from(root, options, page_height, con) { Ok(builder) => builder, Err(e) => { warn!("Error while preparing tree builder: {:?}", e); |