diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-10-16 22:35:09 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-10-16 22:35:09 +0800 |
| commit | 31a6c85731b439dbeb64eacf8f4fc461c0a6264c (patch) | |
| tree | 34f604cfbe8a2807c1b4adf5323b926102d6a9ab /src/core/utils.cc | |
| parent | 1621b3dbfaccb4e2960adba4daf81c967e5cdf9e (diff) | |
| download | rwebbrowser-31a6c85731b439dbeb64eacf8f4fc461c0a6264c.tar.gz rwebbrowser-31a6c85731b439dbeb64eacf8f4fc461c0a6264c.tar.xz | |
Remove legacy terminal UI infrastructure and rename license file
Diffstat (limited to 'src/core/utils.cc')
| -rw-r--r-- | src/core/utils.cc | 33 |
1 files changed, 0 insertions, 33 deletions
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<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 |
