From 150d67e5e129df161df4c4056c77ba937495d932 Mon Sep 17 00:00:00 2001 From: Peter Hebden Date: Sun, 12 Nov 2023 15:24:14 +0000 Subject: [PATCH] fix: "new branch" stdout/err propagation and hide cursor --- src/branch.rs | 5 +++-- src/command.rs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/branch.rs b/src/branch.rs index 4e58451..ff8c16b 100644 --- a/src/branch.rs +++ b/src/branch.rs @@ -95,7 +95,8 @@ impl BranchList { git_process(&["checkout", &self.branches[self.cursor][2..]]) } - pub fn checkout_new(name: &str) -> Result { - git_process(&["checkout", "-b", name]) + pub fn checkout_new(name: &str) -> Result<()> { + MiniBuffer::push_command_output(&git_process(&["checkout", "-b", name])?); + Ok(()) } } diff --git a/src/command.rs b/src/command.rs index d5c6b3f..8cf44b2 100644 --- a/src/command.rs +++ b/src/command.rs @@ -89,6 +89,7 @@ impl GexCommand { BranchList::checkout_new(input)?; status::REFRESH_FLAG.store(true, Ordering::Release); } + print!("{}", cursor::Hide); Ok(()) }), Some("Name for the new branch: "),