diff options
Diffstat (limited to 'src/term')
-rw-r--r-- | src/term/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs index 487ba20d..c49ecbcc 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -97,10 +97,11 @@ impl Search for Term { } fn url_search(&self, mut point: Point<usize>) -> Option<String> { + // Switch first line from top to bottom point.line = self.grid.num_lines().0 - point.line - 1; - // Limit the starting point to the last line in the history - point.line = min(point.line, self.grid.len() - 1); + // Remove viewport scroll offset + point.line += self.grid.display_offset(); // Create forwards and backwards iterators let iterf = self.grid.iter_from(point); |