From f7ce6cd869c2f9bd32700614172cd329938c7e08 Mon Sep 17 00:00:00 2001 From: MeexReay Date: Fri, 21 Mar 2025 21:16:04 +0300 Subject: [PATCH] chevo --- app/kfc/kfc.js | 5 +++++ sys/terminal.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/kfc/kfc.js b/app/kfc/kfc.js index 1fbdf1b..ee69bdf 100644 --- a/app/kfc/kfc.js +++ b/app/kfc/kfc.js @@ -73,7 +73,12 @@ async function main(args) { } else if (event.type == "char") { if (mode == "normal") { if (event.char == ":") { + console.log(status_length) + trimTerminal(status_length) + + console.log(getTerminal()) + writeStdout(":") let command = await readLine() diff --git a/sys/terminal.js b/sys/terminal.js index b310218..fec7941 100644 --- a/sys/terminal.js +++ b/sys/terminal.js @@ -102,8 +102,8 @@ function stripColors(content) { function convertColorCodes(input) { return input.replace(/\$#([0-9a-fA-F]{6})/g, '') .replace(/\$##([0-9a-fA-F]{6})/g, '$#$1') - .replace(/\$([A-Z_]+)/g, '') - .replace(/\$#([A-Z_]+)/g, '$$$1') + .replace(/\$([A-Z_]+)--/g, '') + .replace(/\$#([A-Z_]+)--/g, '$$$1--') .replace(/\$reset/g, '') .replace(/\$#reset/g, '$reset'); }