[#954] terminal.rs: handle multiline descriptions by calling on item.comment

This commit is contained in:
Gabriel Van Zandycke 2025-03-20 14:33:22 +01:00
parent 31d8c26fd8
commit 853346748d

View file

@ -36,7 +36,7 @@ pub fn write(item: &Item) -> String {
format!(
"{tags_short}{delimiter}{comment_short}{delimiter}{snippet_short}{delimiter}{tags}{delimiter}{comment}{delimiter}{snippet}{delimiter}{file_index}{delimiter}\n",
tags_short = style(limit_str(&item.tags, tag_width_percentage)).with(CONFIG.tag_color()),
comment_short = style(limit_str(&item.comment, comment_width_percentage)).with(CONFIG.comment_color()),
comment_short = style(limit_str(&fix_newlines(&item.comment), comment_width_percentage)).with(CONFIG.comment_color()),
snippet_short = style(limit_str(&fix_newlines(&item.snippet), snippet_width_percentage)).with(CONFIG.snippet_color()),
tags = item.tags,
comment = item.comment,