From ef6ca5ff5b599e6b974cfc1a0949512b4a94b131 Mon Sep 17 00:00:00 2001 From: Jonathan Cammisuli Date: Tue, 16 Jan 2024 17:17:36 -0500 Subject: [PATCH] fix(core): use replacen instead of replace to only replace 1 instance of these codes --- packages/nx/src/native/command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nx/src/native/command.rs b/packages/nx/src/native/command.rs index 333c98c9a95e4..8e3c167b11df9 100644 --- a/packages/nx/src/native/command.rs +++ b/packages/nx/src/native/command.rs @@ -163,9 +163,9 @@ pub fn run_command( if strip_clear_code { strip_clear_code = false; // remove clear screen - content = content.replace("\x1B[2J", ""); + content = content.replacen("\x1B[2J", "", 1); // remove cursor position 1,1 - content = content.replace("\x1B[H", ""); + content = content.replacen("\x1B[H", "", 1); } message_tx.send(content.to_string()).ok(); if !quiet {