fix: scrollbar ux

This commit is contained in:
jialin
2024-10-20 12:47:14 +08:00
parent d6fd498489
commit 33a21f2aaa
2 changed files with 23 additions and 4 deletions
+3 -1
View File
@@ -6,7 +6,7 @@ const useParseAnsi = () => {
const lastIndex = useRef(0);
const removeBrackets = useCallback((str: string) => {
return str?.replace?.(/^\(.*?\)/, '');
return str?.replace?.(/^\(\)/, '');
}, []);
const isClean = useCallback((ansiStr: string) => {
@@ -26,6 +26,8 @@ const useParseAnsi = () => {
// replace carriage return and newline characters in the text
let input = inputStr.replace(/\r\n/g, '\n');
lastIndex.current = 0;
// handle the \r and \n characters in the text
const handleText = (text: string) => {
let processed = '';