bhcli

A TUI for chatting on LE PHP Chats (onion)
git clone https://git.dasho.dev/n0tr1v/bhcli.git
Log | Files | Refs | README

commit 31de7ab589ab14d8a0b408a1a364b7d97c332c23
parent 095d73fd18ae18db506271f17c3beb6bed3d8a29
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun,  2 Apr 2023 03:25:20 -0700

cleanup

Diffstat:
Msrc/main.rs | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -2448,12 +2448,10 @@ fn gen_lines(msg_txt: &StyledText, w: usize, line_prefix: String) -> Vec<Vec<(tu } } - let txt = txt.as_str(); - let remain = split.len() - ptr; if txt.len() <= remain { ptr += txt.len(); - line.push((color, txt.to_owned())); + line.push((color, txt)); first_in_line = false; } else { line.push((color, txt[0..remain].to_owned())); @@ -2467,7 +2465,7 @@ fn gen_lines(msg_txt: &StyledText, w: usize, line_prefix: String) -> Vec<Vec<(tu } } } else { - new_lines.push(line.clone()); + new_lines.push(line); break; } }