aboutsummaryrefslogtreecommitdiff
path: root/ricochet/src/core/utils.cc
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-10-16 22:35:09 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-10-16 22:35:09 +0800
commita8c5e1794e4c4b8ca1ad9e6212c1d7ae54dbff6f (patch)
treebeb64a42dfe764fcd4d5de6bc8bd22e53a2c9677 /ricochet/src/core/utils.cc
parente9d48b020d986eb97fb0c00d87bc7bf8a9c10ffa (diff)
downloadrcc-project-a8c5e1794e4c4b8ca1ad9e6212c1d7ae54dbff6f.tar.gz
rcc-project-a8c5e1794e4c4b8ca1ad9e6212c1d7ae54dbff6f.tar.xz
Remove legacy terminal UI infrastructure and rename license file
Diffstat (limited to 'ricochet/src/core/utils.cc')
-rw-r--r--ricochet/src/core/utils.cc33
1 files changed, 0 insertions, 33 deletions
diff --git a/ricochet/src/core/utils.cc b/ricochet/src/core/utils.cc
index ddc6321..a410c8a 100644
--- a/ricochet/src/core/utils.cc
+++ b/ricochet/src/core/utils.cc
@@ -82,37 +82,4 @@ std::string strip_ddg_tracker( std::string target )
return target;
}
-std::vector<std::string> wrap_lines( const std::vector<std::string>& original_lines, std::size_t wrap_width )
-{
- std::vector<std::string> 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