summaryrefslogtreecommitdiff
path: root/support/texlab/crates/texlab/src/features/completion/user_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'support/texlab/crates/texlab/src/features/completion/user_command.rs')
-rw-r--r--support/texlab/crates/texlab/src/features/completion/user_command.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/support/texlab/crates/texlab/src/features/completion/user_command.rs b/support/texlab/crates/texlab/src/features/completion/user_command.rs
index 26708e69ec..e1c517e6aa 100644
--- a/support/texlab/crates/texlab/src/features/completion/user_command.rs
+++ b/support/texlab/crates/texlab/src/features/completion/user_command.rs
@@ -12,8 +12,13 @@ pub fn complete<'db>(
for document in &context.project.documents {
let DocumentData::Tex(data) = &document.data else { continue };
- for (_, name) in data.semantics.commands.iter().filter(|(r, _)| *r != range) {
- builder.user_command(range, name);
+ for name in data
+ .semantics
+ .commands
+ .iter()
+ .filter(|name| name.range != range)
+ {
+ builder.user_command(range, &name.text);
}
}