-
-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indicate to the user when text is copied to the clipboard #642
Indicate to the user when text is copied to the clipboard #642
Conversation
- broadcast CopyToClipboard event to plugins after selection has been copied, and InputReceived event after any input has been received. - add new ClientToServerMsg InputReceived - subscribe status-bar plugin to new events, modify second line after CopyToClipboard, reset it on InputReceived.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, looking good! Do you think we can tie this to existing events rather than sending a new one though?
Also, can we maybe make the text stand out a little more? Maybe be bold and orange/green?
} | ||
|
||
fn update(&mut self, event: Event) { | ||
if let Event::ModeUpdate(mode_info) = event { | ||
self.mode_info = mode_info; | ||
dbg!("got event {:?}", &event); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops :)
Not sure to be honest, out of the existing
Action is maybe a little too generic/vague?
|
What I was thinking is that instead of using Like - any action we get is essentially an "InputReceived", right? So before the match we could clear the "copied" line from the status bar. What do you think? |
P.S. - sorry for delaying so long on replying :) |
- use existing Actions instead to know that user input has been received
Hi @imsnif, I've removed the InputReceived ClientToServerMsg, using existing Actions to know when to send the Event to the plugins. |
Looks great! Thanks for this cool feature :) |
Resolves #640
copied, and InputReceived event after any input has been received.
CopyToClipboard, reset it on InputReceived.