Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'src/bar.rs')
| -rw-r--r-- | src/bar.rs | 25 |
1 files changed, 23 insertions, 2 deletions
@@ -1,9 +1,11 @@ use std::iter::{chain, repeat}; +use std::sync::Arc; use dsb::Cell; use dsb::cell::Style; -use lsp_types::WorkDoneProgress; +use crate::killring::KillRM; +use crate::lsp::communication::WorkDoneProgress; use crate::lsp::{Client, Rq}; use crate::rnd::simplify_path; use crate::sym::Symbols; @@ -23,7 +25,7 @@ impl Bar { fname: &str, state: &super::State, _t: &TextArea, - lsp: Option<&Client>, + lsp: Option<Arc<Client>>, ) { let fname = simplify_path(fname); let row = &mut into[oy * w..oy * w + w]; @@ -128,6 +130,19 @@ impl Bar { } }); } + State::KillRing(KillRM { tedit, .. }) => { + "filter: " + .chars() + .zip(repeat(Style::BOLD | Style::ITALIC)) + .chain(s(&tedit.rope.to_string())) + .zip(row) + .for_each(|((x, z), y)| { + *y = Cell { + letter: Some(x), + style: Style { flags: z, ..y.style }, + } + }); + } State::RequestBoolean(x) => { x.prompt() .chars() @@ -164,6 +179,12 @@ impl Bar { x.letter = Some(c); }); } + State::GoToL(x) => format!("list of {}", x.name()) + .chars() + .zip(row) + .for_each(|(c, x)| { + x.letter = Some(c); + }), State::Save => unreachable!(), _ => {} } |