summaryrefslogtreecommitdiff
path: root/support/texlab/crates/texlab/src/features/inlay_hint.rs
diff options
context:
space:
mode:
Diffstat (limited to 'support/texlab/crates/texlab/src/features/inlay_hint.rs')
-rw-r--r--support/texlab/crates/texlab/src/features/inlay_hint.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/texlab/crates/texlab/src/features/inlay_hint.rs b/support/texlab/crates/texlab/src/features/inlay_hint.rs
index cb4056f922..44ed0757a5 100644
--- a/support/texlab/crates/texlab/src/features/inlay_hint.rs
+++ b/support/texlab/crates/texlab/src/features/inlay_hint.rs
@@ -10,13 +10,13 @@ pub fn find_all(
) -> Option<Vec<lsp_types::InlayHint>> {
let document = workspace.lookup(uri)?;
let line_index = &document.line_index;
- let range = line_index.offset_lsp_range(range);
+ let range = line_index.offset_lsp_range(range)?;
let feature = FeatureParams::new(workspace, document);
let params = InlayHintParams { range, feature };
let hints = inlay_hints::find_all(params)?;
let hints = hints.into_iter().filter_map(|hint| {
- let position = line_index.line_col_lsp(hint.offset);
+ let position = line_index.line_col_lsp(hint.offset)?;
Some(match hint.data {
InlayHintData::LabelDefinition(label) => {
let number = label.number?;