Skip to content
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

add redraw command #4354

Merged
merged 4 commits into from
Dec 15, 2022
Merged

add redraw command #4354

merged 4 commits into from
Dec 15, 2022

Conversation

jrvidal
Copy link
Contributor

@jrvidal jrvidal commented Oct 18, 2022

Not sure if we want this, as per this comment, but anyway, here it is.

Fixes #4350


let callback = Box::pin(async move {
let call: job::Callback = Box::new(|_editor, compositor| {
compositor.clear().expect("unable to redraw");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure how OK it is to panic here. I was looking how the error from terminal.clear() is propagated and it ultimately panics on resize() so... 🤷

Copy link
Member

Choose a reason for hiding this comment

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

I think panicking on this is ok. To not panic we could say

editor.set_error("Could not redraw terminal")

but if we can't draw the terminal then I doubt that would end up showing up 😄

@the-mikedavis the-mikedavis added A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer. labels Oct 19, 2022
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
@jrvidal jrvidal requested a review from the-mikedavis October 19, 2022 06:19
@archseer archseer merged commit f916915 into helix-editor:master Dec 15, 2022
@jrvidal jrvidal deleted the redraw-command branch December 15, 2022 09:39
@archseer
Copy link
Member

Merged this but had to revert in master, terminal is no longer avaliable via compositor

freqmod pushed a commit to freqmod/helix that referenced this pull request Feb 8, 2023
* add redraw command

* update docs

* Update helix-term/src/commands/typed.rs

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* update docs

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to refresh/reset/redraw/repaint the screen?
3 participants