Skip to content

Commit

Permalink
File matches for the whole first line instead of first character
Browse files Browse the repository at this point in the history
  • Loading branch information
Feel-ix-343 committed Dec 6, 2023
1 parent 5e1d247 commit b8d5dbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl Linkable<'_> {

pub fn get_range(&self) -> tower_lsp::lsp_types::Range {
match self {
&Linkable::MDFile(_, _) => tower_lsp::lsp_types::Range { start: Position { line: 0, character: 0 }, end: Position { line: 0, character: 1 } },
&Linkable::MDFile(_, _) => tower_lsp::lsp_types::Range { start: Position { line: 0, character: 0 }, end: Position { line: 0, character: u32::MAX} },
&Linkable::Heading(_, heading) => heading.range,
&Linkable::IndexedBlock(_, indexed_block) => indexed_block.range
}
Expand Down Expand Up @@ -471,7 +471,7 @@ more text
uri: Url::from_file_path(result_path.to_str().unwrap()).unwrap(),
range: Range {
start: Position { line: 0, character: 0 },
end: Position { line: 0, character: 1 }
end: Position { line: 0, character: u32::MAX }
}
});
assert_eq!(result, proper);
Expand Down

0 comments on commit b8d5dbf

Please sign in to comment.