diff options
author | Leoi Hung Kin | 2021-10-15 08:36:39 +0000 |
---|---|---|
committer | GitHub | 2021-10-15 08:36:39 +0000 |
commit | 4d07eaa48bc4fc0c75e0346406fb6dedfc7db743 (patch) | |
tree | c287cb1d6890865bfd3954aeeeb227c9da7d7550 /helix-term/src/compositor.rs | |
parent | ef3f78b6ce79ab17d85780ec02af12ed1459b971 (diff) |
Prevent LSP Messages from displaying when a prompt is presented (#824)
* Prevent LSP Messages from displaying when a prompt is presented
* use match guard
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r-- | helix-term/src/compositor.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs index 36e54ede..cad1df05 100644 --- a/helix-term/src/compositor.rs +++ b/helix-term/src/compositor.rs @@ -171,6 +171,12 @@ impl Compositor { (None, CursorKind::Hidden) } + pub fn has_component(&self, type_name: &str) -> bool { + self.layers + .iter() + .any(|component| component.type_name() == type_name) + } + pub fn find(&mut self, type_name: &str) -> Option<&mut dyn Component> { self.layers .iter_mut() |