From b8a07f7d15a10186fa2b481a3423c23f32d7d561 Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Fri, 24 Jun 2022 08:39:07 -0400 Subject: add conditional noop render back It makes it much slower without stubbing this out --- helix-term/src/commands/typed.rs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'helix-term/src/commands') diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index bc254146..14b23f2a 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -273,12 +273,7 @@ fn write_impl( let fmt = if auto_format { doc.auto_format().map(|fmt| { let shared = fmt.shared(); - let callback = make_format_callback( - doc.id(), - doc.version(), - Modified::SetUnmodified, - shared.clone(), - ); + let callback = make_format_callback(doc.id(), doc.version(), shared.clone()); jobs.callback(callback); shared }) @@ -346,8 +341,7 @@ fn format( let doc = doc!(cx.editor); if let Some(format) = doc.format() { - let callback = - make_format_callback(doc.id(), doc.version(), Modified::LeaveModified, format); + let callback = make_format_callback(doc.id(), doc.version(), format); cx.jobs.callback(callback); } @@ -593,12 +587,7 @@ fn write_all_impl( let fmt = if auto_format { doc.auto_format().map(|fmt| { let shared = fmt.shared(); - let callback = make_format_callback( - doc.id(), - doc.version(), - Modified::SetUnmodified, - shared.clone(), - ); + let callback = make_format_callback(doc.id(), doc.version(), shared.clone()); jobs.callback(callback); shared }) -- cgit v1.2.3-70-g09d2