aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
authorWeiyuan Wu2023-09-08 01:46:36 +0000
committerGitHub2023-09-08 01:46:36 +0000
commit8017bb29990bd15eb31542fa25e8cb1207364b07 (patch)
treed035eb5f2348967bb41dcda6cb9f50fcf73ecd17 /helix-term/src/application.rs
parentc0fd8bc61b4c1611a48312938aaf0e3121f393b1 (diff)
add redraw command (#6949)
Co-authored-by: Roberto Vidal <vidal.roberto.j@gmail.com>
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 0d40fa66..3e6da5bb 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -251,6 +251,11 @@ impl Application {
}
async fn render(&mut self) {
+ if self.compositor.full_redraw {
+ self.terminal.clear().expect("Cannot clear the terminal");
+ self.compositor.full_redraw = false;
+ }
+
let mut cx = crate::compositor::Context {
editor: &mut self.editor,
jobs: &mut self.jobs,