CmdInfo: Fix leading spaces before urgency value

The minimal field width is set to 4, so if the value is shorter, it gets
prefixed with spaces, breaking the flow of the table.
This commit is contained in:
Dominik Rehák 2022-04-13 04:02:16 +01:00 committed by Tomas Babej
parent 7400e6ed6b
commit 8c3aa95224

View file

@ -37,6 +37,7 @@
#include <shared.h>
#include <format.h>
#include <util.h>
#include <Lexer.h>
////////////////////////////////////////////////////////////////////////////////
CmdInfo::CmdInfo ()
@ -373,7 +374,7 @@ int CmdInfo::execute (std::string& output)
// Task::urgency
row = view.addRow ();
view.set (row, 0, "Urgency");
view.set (row, 1, format (task.urgency (), 4, 4));
view.set (row, 1, Lexer::trimLeft (format (task.urgency (), 4, 4)));
// Show any UDAs
auto all = task.all ();