Skip to content

Detach hint title from completion text#414

Merged
gwenn merged 1 commit intokkawakam:masterfrom
tailhook:hint_display
Aug 23, 2020
Merged

Detach hint title from completion text#414
gwenn merged 1 commit intokkawakam:masterfrom
tailhook:hint_display

Conversation

@tailhook
Copy link
Copy Markdown
Contributor

@tailhook tailhook commented Jul 9, 2020

This solution came up in disussion of #397

Fixes #397, and perhaps #413

Comment on lines +54 to +58
fn hint(&self, _line: &str, _pos: usize, _ctx: &rustyline::Context<'_>)
-> Option<Self::Hint>
{
None
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless !

let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
let expanded = quote! {
impl #impl_generics rustyline::hint::Hinter for #name #ty_generics #where_clause {
type Hint = String;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::string::String

@gwenn gwenn mentioned this pull request Aug 23, 2020
@gwenn gwenn merged commit 2b43fef into kkawakam:master Aug 23, 2020
@tailhook tailhook deleted the hint_display branch August 24, 2020 08:39
@tailhook
Copy link
Copy Markdown
Contributor Author

Thank you. Sorry that I didn't find time to finish this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Am I using hint in the right way?

2 participants