diff options
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 6b8aa7a8e..d0188da44 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -323,6 +323,10 @@ impl Analysis { | |||
323 | position: FilePosition, | 323 | position: FilePosition, |
324 | char_typed: char, | 324 | char_typed: char, |
325 | ) -> Cancelable<Option<SourceChange>> { | 325 | ) -> Cancelable<Option<SourceChange>> { |
326 | // Fast path to not even parse the file. | ||
327 | if !typing::TRIGGER_CHARS.contains(char_typed) { | ||
328 | return Ok(None); | ||
329 | } | ||
326 | self.with_db(|db| typing::on_char_typed(&db, position, char_typed)) | 330 | self.with_db(|db| typing::on_char_typed(&db, position, char_typed)) |
327 | } | 331 | } |
328 | 332 | ||