Enable offset-encoding capability
This commit is contained in:
@@ -22,7 +22,7 @@ use crate::{
|
||||
diagnostics::{CheckFixes, DiagnosticCollection},
|
||||
document::DocumentData,
|
||||
from_proto,
|
||||
line_endings::{LineEndings, LineIndex, OffsetEncoding},
|
||||
line_endings::{LineEndings, LineIndex},
|
||||
main_loop::Task,
|
||||
op_queue::OpQueue,
|
||||
reload::SourceRootConfig,
|
||||
@@ -274,7 +274,7 @@ impl GlobalStateSnapshot {
|
||||
pub(crate) fn file_line_index(&self, file_id: FileId) -> Cancelable<LineIndex> {
|
||||
let endings = self.vfs.read().1[&file_id];
|
||||
let index = self.analysis.file_line_index(file_id)?;
|
||||
let res = LineIndex { index, endings, encoding: OffsetEncoding::Utf16 };
|
||||
let res = LineIndex { index, endings, encoding: self.config.offset_encoding() };
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user