From 082e073a7e678a8ee5e0957fdf8c9f6580e01bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awek=20Piotrowski?= Date: Mon, 24 Jun 2024 10:57:55 +0200 Subject: [PATCH] Don't show diff on first command result Currently command result is initialized as empty which means that the first diff shows everything as added. With this change the no changes are shown on the first command result. --- src/app.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index 1d238c7..ee54dc5 100644 --- a/src/app.rs +++ b/src/app.rs @@ -475,7 +475,7 @@ impl<'a> App<'a> { let dest: &CommandResult = &results[&target_dst].command_result; // set old text(text_src) - let mut src = &CommandResult::default(); + let mut src = dest; if previous_dst > 0 { src = &results[&previous_dst].command_result; }