From 636c8f50e0c174efe91e7601c6d3497e6b8aa2c5 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 26 Sep 2021 21:24:54 -0400 Subject: [PATCH] CmdNews: Render all news items --- src/commands/CmdNews.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index 446a6cbe5..84beb9584 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -146,9 +146,19 @@ int CmdNews::execute (std::string& output) bool full_summary = matches.size () == 1 && matches[0] == "full" ? true : false; // Print release notes - std::cout << "Taskwarrior 2.6.0 Release Notes" << std::endl; + Color bold = Color ("bold"); + std::cout << bold.colorize ( + "\n" + "===============================\n" + "Taskwarrior 2.6.0 Release Notes\n" + "===============================\n" + ); - wait_for_keypress (); + for (unsigned short i=0; i < items.size (); i++) { + std::cout << format ("\n({1}/{2}) ", i+1, items.size ()); + items[i].render (); + wait_for_keypress (); + } // Set a mark in the config to remember which version's release notes were displayed if (config.get ("news.version") == "2.6.0")