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

@ -1,14 +1,13 @@
use std::path::PathBuf;
use distro::Language;
use rowan::TextSize;
use syntax::{bibtex, latex, BuildError};
use url::Url;
use crate::{
diagnostics::{self, Diagnostic},
semantics,
util::LineIndex,
util::{LineCol, LineIndex},
Config,
};
@ -26,7 +25,7 @@ pub struct Document {
pub text: String,
pub line_index: LineIndex,
pub owner: Owner,
pub cursor: TextSize,
pub cursor: LineCol,
pub language: Language,
pub data: DocumentData,
pub diagnostics: Vec<Diagnostic>,
@ -38,7 +37,7 @@ impl Document {
text: String,
language: Language,
owner: Owner,
cursor: TextSize,
cursor: LineCol,
config: &Config,
) -> Self {
let dir = uri.join(".").unwrap();