Adjust signature of jump_from_cursor

This commit is contained in:
Laurenz 2023-11-30 19:09:42 +01:00
parent f16a9ea9ad
commit 293a715443

View File

@ -111,7 +111,7 @@ pub fn jump_from_click(
/// Find the output location in the document for a cursor position. /// Find the output location in the document for a cursor position.
pub fn jump_from_cursor( pub fn jump_from_cursor(
frames: &[Frame], document: &Document,
source: &Source, source: &Source,
cursor: usize, cursor: usize,
) -> Option<Position> { ) -> Option<Position> {
@ -121,7 +121,7 @@ pub fn jump_from_cursor(
} }
let span = node.span(); let span = node.span();
for (i, frame) in frames.iter().enumerate() { for (i, frame) in document.pages.iter().enumerate() {
if let Some(pos) = find_in_frame(frame, span) { if let Some(pos) = find_in_frame(frame, span) {
return Some(Position { return Some(Position {
page: NonZeroUsize::new(i + 1).unwrap(), page: NonZeroUsize::new(i + 1).unwrap(),