Fix tracking cursor position (#889)

This commit is contained in:
Patrick Förster 2023-05-20 21:02:47 +02:00 committed by GitHub
parent 68bf2b3d96
commit 10890d8869
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 62 additions and 60 deletions

View file

@ -32,6 +32,7 @@ pub enum ForwardSearchError {
LaunchViewer(#[from] std::io::Error),
}
#[derive(Debug)]
pub struct ForwardSearch {
program: String,
args: Vec<String>,
@ -79,7 +80,7 @@ impl ForwardSearch {
let tex_path = tex_path.to_string_lossy().into_owned();
let pdf_path = pdf_path.to_string_lossy().into_owned();
let line = line.unwrap_or_else(|| child.line_index.line_col(child.cursor).line);
let line = line.unwrap_or_else(|| child.cursor.line);
let line = (line + 1).to_string();
let program = config.program.clone();