From 31a6c85731b439dbeb64eacf8f4fc461c0a6264c Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 16 Oct 2026 22:35:09 +0800 Subject: Remove legacy terminal UI infrastructure and rename license file --- src/core/utils.cc | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'src/core/utils.cc') diff --git a/src/core/utils.cc b/src/core/utils.cc index ddc6321..a410c8a 100644 --- a/src/core/utils.cc +++ b/src/core/utils.cc @@ -82,37 +82,4 @@ std::string strip_ddg_tracker( std::string target ) return target; } -std::vector wrap_lines( const std::vector& original_lines, std::size_t wrap_width ) -{ - std::vector wrapped_lines; - for ( const auto& line : original_lines ) { - std::string current_line; - std::size_t vis_count = 0; - bool in_ansi = false; - for ( const char c : line ) { - if ( c == '\x1b' ) { - in_ansi = true; - } - if ( in_ansi ) { - current_line += c; - if ( c == 'm' ) { - in_ansi = false; - } - } else { - if ( vis_count >= wrap_width ) { - wrapped_lines.push_back( current_line + "\033[0m" ); - current_line.clear(); - vis_count = 0; - } - current_line += c; - vis_count++; - } - } - if ( !current_line.empty() || line.empty() ) { - wrapped_lines.push_back( current_line + "\033[0m" ); - } - } - return wrapped_lines; -} - } // namespace ricochet::core -- cgit v1.2.3