diff options
Diffstat (limited to 'support/texlab/src/features/completion')
-rw-r--r-- | support/texlab/src/features/completion/builder.rs | 12 | ||||
-rw-r--r-- | support/texlab/src/features/completion/include.rs | 2 |
2 files changed, 3 insertions, 11 deletions
diff --git a/support/texlab/src/features/completion/builder.rs b/support/texlab/src/features/completion/builder.rs index f8ea4c5d15..686d39b62b 100644 --- a/support/texlab/src/features/completion/builder.rs +++ b/support/texlab/src/features/completion/builder.rs @@ -60,8 +60,7 @@ impl<'db> CompletionBuilder<'db> { .take_while(|word| word.text_range() != token.text_range()) .chain(std::iter::once(token.clone())) .filter(|word| word.text_range().start() < context.offset) - .join(" ") - .into(), + .join(" "), None => token.text().into(), } } @@ -180,14 +179,7 @@ impl<'db> CompletionBuilder<'db> { "{} {}", key, WHITESPACE_REGEX - .replace_all( - &code - .replace('{', " ") - .replace('}', " ") - .replace(',', " ") - .replace('=', " "), - " " - ) + .replace_all(&code.replace(['{', '}', ',', '='], " "), " ") .trim(), ); diff --git a/support/texlab/src/features/completion/include.rs b/support/texlab/src/features/completion/include.rs index bde7544570..5d7654a208 100644 --- a/support/texlab/src/features/completion/include.rs +++ b/support/texlab/src/features/completion/include.rs @@ -119,7 +119,7 @@ fn current_dir( path.push(graphics_path); } - path.push(&path_text); + path.push(path_text); if !path_text.ends_with('/') { path.pop(); } |