diff options
author | gfreezy <[email protected]> | 2019-01-20 04:02:00 +0000 |
---|---|---|
committer | gfreezy <[email protected]> | 2019-01-20 04:02:00 +0000 |
commit | 2a43638052213d1faa690e6d68bd5702e44fa027 (patch) | |
tree | 38cb979816dcdff9b9847592a1f99193f0bda70b /crates/ra_ide_api/src/completion/completion_context.rs | |
parent | 94d96b60f334e662f516bd0f04cc4191d7a804e6 (diff) |
use a combination of `source_change` and `text_edit` for `CompleteItem`
Diffstat (limited to 'crates/ra_ide_api/src/completion/completion_context.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_context.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs index de9b95c81..fd4cfc944 100644 --- a/crates/ra_ide_api/src/completion/completion_context.rs +++ b/crates/ra_ide_api/src/completion/completion_context.rs | |||
@@ -65,7 +65,10 @@ impl<'a> CompletionContext<'a> { | |||
65 | Some(ctx) | 65 | Some(ctx) |
66 | } | 66 | } |
67 | 67 | ||
68 | pub(crate) fn leaf_range(&self) -> TextRange { | 68 | // The range of the identifier that is being completed. |
69 | // This is purely advisory and can be used, for example, to highlight this range in the editor. | ||
70 | // Clients are expected to ignore this field. | ||
71 | pub(crate) fn source_range(&self) -> TextRange { | ||
69 | self.leaf.range() | 72 | self.leaf.range() |
70 | } | 73 | } |
71 | 74 | ||