Skip to content

Commit

Permalink
Fix include provider on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
efoerster committed Jun 3, 2019
1 parent bdc8ca5 commit 5de9cbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/completion/latex/include.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ fn current_directory(
request: &FeatureRequest<CompletionParams>,
command: &LatexCommand,
) -> PathBuf {
let mut path = PathBuf::from_str(request.document.uri.path()).unwrap();
let mut path = request.document.uri.to_file_path().unwrap();
path = PathBuf::from(path.to_string_lossy().into_owned().replace('\\', "/"));

path.pop();
if let Some(include) = command.extract_word(0) {
path.push(include.text());
Expand Down

0 comments on commit 5de9cbd

Please sign in to comment.